Tuesday, October 29, 2013

How We Feel About PHP


After today I came to this conclusion, PHP is my arch nemeses! Well, for the time being that is. While my confidence for programming grows each day, I know that once I master PHP other languages will be easier for me. I spent most of Sunday re-learning and watching the basic PHP video tutorials so that I can have a better grasp and understanding of the language at hand. Today however, I really hit the ground running trying to finish up the advanced section, it's truly amazing how a little relaxing music and coffee can increase your performance. I spent almost 8 hours today working on a form in which a user can input their email address and gets a response if the email is valid or invalid. It was way more complicated than I first imagined. First, I had to create a form placed within index.php, then send that to the page process.php. When it is sent to process.php I had to come up with the function that would check whether or not the email was valid and if it was valid the user would be directed to another page called success.php. I took the liberty of posting an example of what I had to create since it may sound confusing, I will also be posting the code too. The hardest part about this assignment was the second part, which was figuring out how to link it to the MySQL database, by using the code bellow in the success.php page. 
                                          


                           session_start();
==>                   include("connection.php");
                          echo $_SESSION['success'];
                         $emails = fetch_all("SELECT emails.email, emails.created_at FROM emails");



In other news, during lecture today we went through all the steps of steps of how to setup Git and Github (which pretty much is a version control system for our code). Soon enough I will be posting all my code on Github, so you can find me there! It was a rough day for most people today, PHP really knows how to suck the life out of you, so a few of us, including myself decided to take a power nap, which studies show anywhere from 10 to 15 minutes is enough to restore wakefulness and promote performance and learning. It was a rough day for us all... PHP - 1    Abe  - 0




success.php

process.php

connection.php

assignment


How we feel about PHP....

PHP's wrath....

Thursday, October 24, 2013

MySQL & PHP

I have been slacking on these blog posts lately, only because the workload at the Dojo has been getting progressively challenging. Since I last blogged, I had spoke about attending Uncubed, which was an incredible experience. If you really want to get your feet wet and a better understanding of what a startup tech company is all about then I highly recommend attending. The workshops at Uncubed focused on how to prepare for a tech interview, how to get hired at a startup company and even how to build a resume. In class we have been working on MySQL, (which is a database management system), and PHP, a (server-side scripting language).  Right now I am working through PHP, and let me tell you, it’s no duck walk, especially for someone who is new to programming. We are using MAMP/WAMP as our local server; setting up was the easy part but learning how and when to use loops, arrays, if/else statements, functions and variables is the tricky part. The coolest and most exciting project I did so far has been the coin toss assignment, in which you create a program that simulates someone throwing a coin 5000 times. The program also has to output how many times the coin ends up as heads and how many times the coin will end up as tails. Took me me some time and thinking to finish it but through strength and struggle, I got this! I posted some examples bellow of what I have been working on. Until we meet again, goodnight world!


Coin Toss











Wednesday, October 16, 2013

Uncubed Tomorrow!

I spent the past two days working with JQuery and JQuery UI, which is a lot more fun than anything we have done so far. The first four assignments I blazed through but ran into some trouble on the fifth. The fifth assignment was to "create a html form with two input for dates and a submit button (the button must be input type='submit' and not a button html tag). When the form is submitted, have it display the values of the two input date fields above the form. Use jQueryUI datepicker function for the two dates". Creating the submit button and the date picker was a breeze, however, getting the function to display the values of the two input date fields took some time for me to understand. Here is what I came up with. Images are displayed bellow. On another note, everything is going great! Our class is taking a felid trip to San Francisco tomorrow to attend Uncubed, which I have been looking forward to all week! 




Monday, October 14, 2013

jQuery is MAGIC


I clocked in roughly 70+ hours last week at the Dojo, talk about exhilarating! I decided to take Sunday off and recharge with a stroll through my neighborhood and much needed sleep. When you are wired in all day you sometimes loose track of time and the day can quickly go by. My advice for any future students planning on attending the Coding Dojo; take off at least one day during the week to rest your body and mind, it's quite therapeutic to unplug from technology for a day and just focus on yourself. We started jQuery today, which is an open source cross-browser that has a JavaScript library. In simpler terms, it makes web pages more dynamic and interactive, comparable to flash-like animations. I could not believe how much fun I had messing around with it all day. I'll definitely be using this language to design my personal web page. Moreover, when working on the given assignment I was having difficulty figuring out how to get the .slideToggle() function to work, been scratching my head all night trying to figure out how to get it working! I will post the command in my blog; any feedback would be greatly appreciated. Good night!

First Week at Coding Dojo


Saturday, October 5th 2013:


After some long-term soul searching I finally found something that I could strive to be passionate about for years to come, coding. There was one small problem though; I had NO coding experience whatsoever. I considered going back to Arizona State University in the hopes of attaining a CIS degree. After scouring the Internet for schools that would teach me how to code I happened to stumble upon the Coding Dojo. The Coding Dojo is a 9-week intensive bootcamp that teaches web-based language such as; HTML, CSS, Java, PHP, MySQL, OOP, MVC, Ruby on Rails etc. I decided to apply and shortly after I was accepted. Ecstatic and intimidated I thought to myself, “surely there are going to be some people that will be more knowledgeable about coding than myself”, but this didn’t stop me from going. Now, I found myself 800 miles away from home living in Silicon Valley where I attend the Dojo 6 days a week. Here is a breakdown of what the first week is like and what I have learned thus far.



Monday, October 7th, 2013:


The first day consisted of a really nice introduction from our instructors and staff. Since you are not familiar with the people or routine, the first day can always be awkward. Honestly though, that awkwardness dies out once you get to know everyone’s names, where they are from and one interesting fact about them. It was really great to break the ice and mingle with my coding mates. Monday’s lesson focused primarily on HTML, which I thought I knew but I guess I was wrong.  The first two hours was a struggle, we had to construct a “fake blog” and I had no idea what I was doing or where to start. However, with time, trial, and error I got through the first assignment with minimal headache. Practice makes perfect and I know if I keep at it I can be a natural. See you tomorrow!

Tuesday, October 8th 2013:


Today we are working on CSS, which is basically the esthetics of a web page. This has been really frustrating! Figuring out where to float a specific piece of content is challenging especially when you have no idea what you are doing until you actually learn it. Slowly but surely I am learning this stuff. You just have to mess around with it and that just takes time.


Wednesday, October 9th 2013:


Comparable to someone working on the set of a movie and looking behind the scenes, I came to the realization that I can never look at a web page the same.  It’s day three and I have been fortunate enough to learn an overwhelming amount of information at the Dojo. Coding all day can be mentally exhausting, so I learned that sometimes you just need a <br>. Today’s assignment was to emulate a screenshot from scratch using HTML and CSS. I have the HTML part, down; again, just figuring out where to float the content can be frustrating. I also made the mistake of using <div class="header"> and using a “#” instead of the “.” Note to self: Use one or the other! Today is sports day, spent a few hours in the park throwing a football around with some classmates that quickly turned into friends. Time for me to catch some Z’s… until we meet again!


Thursday, October 10th 2013:


Starting to get this CSS stuff and with more practice I find myself getting faster at building a page from scratch. The third assignment is just another screen shot that has to be emulated. Little roadblocks here and there but I have inspect element on my side, which can ultimately be your best friend when you have no idea what is going wrong.


Friday, October 11th 2013:



Worked on the last CSS screen shot assignment today, seem to be getting through it quickly with minimal struggle. I have so many div tags nested within so many divs! I figured out that if I start doing the HTML and CSS together from the header all the way to the footer, I would be able to get the assignment done faster and can keep everything simpler and more organized. Finished all my assignments for the week and I am ready to mess around with Bootstrap. I asked a few classmates and some said they love it while others don’t, I will be the judge of that I guess. Going to the Hacker Dojo tonight, hopefully will meet some brilliant minds there. See you on Monday!