Saturday, April 26, 2014

“Whether you think you can, or you think you can't--you're right.”

Time for another update from Coder Camps!

To recap, this week we've been focused on server side programing, using C# to create MVP apps. For the first few days we could only send information to the browser. Then we learned (all over again) how to get information back from the user, but we had nowhere to store it. Refresh the screen; or just navigate to a different page on the same website and the info was gone. Yesterday we learned about Singletons - which can sort of serve as a way to preserve state, and therefore retain the user's info. But even that is still a temporary measure. Next week, with SQL I get full functionality back!

Aside from the frustration that came from not having all the cool frontend tools I'd learned about available to me, it was a great week. I learned about the differences between how frontend and backend programing work, more about the MVC concept, and so much more. I hit some personal limits in terms of my endurance (aka my ability to go without proper sleep) and adjusted accordingly. Despite all the learning I've done, this is just a drop in the ocean of what's out there to know and understand.

You can look at a fact like that in two ways - you could be daunted by the vast size of the unknown, or you could be excited by it. More than anything else, I think it's which of these attitudes a person adopts that determines their success in becoming a developer. Coder Camps has reinforced my belief in my own ability to learn and grow. And with that ability, theres no problem I can't solve in time.

There was a quote on a door in the old Coder Camps office:

“Whether you think you can, or you think you can't--you're right.” 
― Henry Ford


This is a very true thing.

Wednesday, April 23, 2014

The Halfway Point

I'm now officially past the halfway point at Coder Camps! At least for the main 9 week segment. After that I may be staying for the optional 3 week Masters program to work on a personal project.

The first three weeks was front end focused, learning Javascript, Angular and how to use AJAX calls and API's to perform CRUD operations (Create, Read, Update, and Delete) to a remote Nosql database.

This week and the next two we're back-end focused, using C# and a SQL database. We're working with Visual Studios and MVC 5, we'll also be incorporating Entity Framework.

After this phase is over my troop will spend three weeks working on a real-world App. At that point I decide whether to stay an additional three weeks to work on a personal project. I've got several ideas for projects, but honestly, it will come down to where I'm at in my job search.

I've already acquired a huge amount of knowledge; with even more still to come. Every day I create multiple apps and I spend at least ten hours either coding, learning to code, or learning best practices. In the last ten days I've entered into a constant state of semi-exhaustion.

Eat. Sleep. Code. That's the Coder Camps credo. What they don't tell you is that you may also dream about coding - which I've been doing lately. So it's really been Eat. Code. Code.

There is nothing more frustrating than dreaming about solving a coding problem. You feel like you are working hard, but its a dream so it really makes no sense and you never get anywhere. Still, it means my brain is working hard to incorporate all this new information, so I'll take it.

At the end of this experience I'll have spent 700+ hours dedicated to programing.  Will I be an expert? By no means. Will I have acquired many in-demand and job-applicable skills? Absolutely. Will I still have a lot to learn? Oh my, yes. Will I know how to learn what I don't know? You had better believe it!

Monday, April 21, 2014

Thank you Coder Camps!

The blog is back! We had a long weekend at Coder Camps and the timing could not have been better. I didn't take the entire three days off from coding and studying but setting asidethe blog, and Visual Studios (for the most part) really helped me to recharge and get ready for phase 2.

Speaking of which, today was the first day of backend development. We dove into C#, Razor, and .Net MVC. Talking about the differences between Javascript and C#  also led us into a discussion about interpreters, compilers, and CLR.

Today was another great example of why a place like Coder Camps is worth the money. Last year I was teaching myself some C# and I learned quite a bit from youtube tutorials and hacking away at my own projects.  But there are so many concepts that you can't fully grasp, or can't understand the importance of without the benefit of an experienced teacher giving you context and direction.

A quick and very simple example - I had seen the term namespace before, but I didn't really understand what I'd do with it. I was able to put together apps that worked just using classes, so what's a namespace good for?  Well I wasn't building web apps back then, and I certainly was not using MVC. Today, when we put a simple MVC app together the benefit (or at least one of them) was obvious from the start.

I doubt there's anything I'll learn at camp that I couldn't have learned on my own from the web and a few good books - but the time saved is tremendous! What I learned in the last three weeks would probably have taken me three months or more of self directed study.  Probably longer as I would have been doing so many things the hard way without knowing there were better methods available.

So thank you, Coder Camps! Without your program my dream of becoming a developer would still be just that, a dream. With you, its fast becoming reality.

Wednesday, April 16, 2014

Obstacles - opportunities in disguise

Tomorrow is the last day of phase 1 at Coder Camps. Here's a very quick video shows (most) everything we covered in the last twelve days:
Today included more Angularjs including factories and customer filters. In the last hour of the day I built up an app that yesterday would have taken me two hours, the day before that three, and last week I probably couldn't have made at all.

On day one, Coder Camps founder David Graham warned us our stress level at camp should be around an 8 (of 10) on a constant basis. The last five to seven days, mine sure has been.  Long nights, lots of coding, lots of learning, frustrating problems, gratifying breakthroughs, copious amounts of caffeine, and not enough sleep.

 And if I had to do it all over again, I wouldn't change a thing.

 Last night I breezed through most of the app I was building, only to get stuck on the last bit of functionality - building a feature where the user can select multiple items from a list and view them side by side in a comparison view.

I spent far more time working on that problem than I had on the entire rest of the build. In the end I had to surrender to the need for sleep, but not before I gained a much better understanding of how MVC controllers work than I had going into the project. I fell asleep thinking of different solutions I could implement the next morning. A couple of them were workable too; even though we learned a more elegant solution using an Angular factory today.

My point is, all that frustration and lost sleep was totally worth it - I learned more about Angular from trying to solve that obstacle than I had from creating two or three successful builds earlier. I can't wait to see what I don't know how to do tomorrow.

Tuesday, April 15, 2014

Just a little bit of Bytes.

Quick update today. We dove deeper into Angular, using filters, modules, and multiple views. This afternoon I wrote an app similar to ones we've created over the last few days - it took about an hour from start to finish which is a third of the time (or less) that it would have taken me without Angular. And the code we so short! 60 lines in my scripts.js file and only that long to enhance readability. Suffice it to say - Angular? I approve.

Last night I started my homework late, which wasn't good but did leave me awake at 2:00 am in order to see the awesome lunar eclipse.

Tonight I'll have my homework done early; still, staying up to get it finished last night was totally worth it - even without good sleep I was prepared for today's material and Angular is really clicking for me. Put in the work and your efforts will be rewarded.

Monday, April 14, 2014

Angular, MVC, and Game of Thrones

In the app - add a character and they are automatically added the to proper House, hovering over a character's name reveals their portrait.
Time for another update from Coder Camps! Last week we learned about communicating with a database and updating a web page without having to refresh the browser window using AJAX. Friday we learned how to using polling (and touched on websockets) so that a web app can check for database updates automatically without the user having to do anything.

To practice we made an instant messenger app that connects to any number of friends and checks for new messages every second. I sorted the messages by date, including my own, to form a message feed.

The homework over the weekend was to build out a Twitter clone with the following functionality:
Post tweets, maintain a profile, maintain a friends list, display a feed of friend's tweets that updates automatically, and display a list of your friend's friends that you can click to make them your friends as well.

I got all the major features up and running but late Sunday night I bogged down trying to get my app to upload a user's picture file (.jpg/.png/etc) to Firebase - the NoSQL database we were using. It was a good reminder that, whenever I'm spending a long time on a problem without making progress, I'm probably going about it the wrong way.  This morning I mentioned it to my housemates who then suggested the (in hindsight) very obvious 5-minute solution. And yes, storing your images in your database is usually the wrong way.

Today we got introduced to Angularjs and the MVC framework (although Angular is technically MV*). We built out a Game of Thrones page that lists characters by House - very similar to projects we did last week but with Angular the app was written in a fraction of the time and with a fraction of the lines of code.

Also for the first time we used AJAX calls from a library (Angular, of course) rather than using vanilla Javascript. Tonight for homework I'll be writing another similar app, including edit, delete, and search capability, using Angular.

Time is really playing tricks on me right now; because we've covered so much ground it feels in one sense like I've been here much longer than two weeks; simultaneously, because everything is constantly new and interesting, the time seems to fly right by.

That's all for today from Houston, talk to tomorrow!

Thursday, April 10, 2014

From proud, to humble, to excited for more

Yesterday I mentioned I was proud of myself for completing all the stretch goals from Tuesday. Of course, the next thing that happened was, I hit a wall. Last night's stretch goal included writing an anonymous call back function, amongst other tasks, with no more direction than what I just described. We've talked about callbacks before, and used one once or twice but its not a subject we'd really studied yet.

I did not complete the stretch goals. I did learn several ways in which you cannot write anonymous call back functions (or rather several ways you can write them if you don't mind them not functioning as expected).

Today we covered the subject in depth and I learned how to make use of them (and when not to make use of them) to make code more readable, flexible, and to help with separation of concerns. I also got to see some new approaches to DOM manipulation I had not thought of previously. We also learned how to write some helper functions that reduced our need to query the database for as much information, and as frequently was we were doing earlier in the week.

Finally, we started working on a 4 day project making a Twitter clone.  Each student in my class will create their own App including individual databases and UI's that will include our own profile, our tweets, a friends list, our friend's tweets, and the ability to see friends of friends and add them to our own friends list.

Our App should also allow us to edit our own profile, as well as edit and delete our own tweets. This one's going to go in my portfolio for sure. I can't believe how much ground we have covered in under two weeks!  Next week we dive into Angular.JS and the week after its time for backend and C#, which I can hardly wait for!

Wednesday, April 9, 2014

CRUD, AJAX!

This week at Coder Camps we've been working with AJAX to communicate with a NoSQL database. We're doing "Coder pushups" - creating a series of similar apps, adding functionality each time in order to practice the process and master the concepts. The screenshot above is of the app I made last night.

It's a simple list of monsters. You can add a new one, edit or delete an existing one, and sort the list. The list is stored on a Firebase database and uses a RESTful AJAX method to GET, POST, PUT, and DELETE from the database; the code then rewrites the table without refreshing the browser. I used Bootstrap for the (minimal) CSS styling. There's one line of JQuery that makes a Bootstrap modal function, otherwise this was done in straight Javascript, including the AJAX - we are learning the hard way first so we actually understand what's happening - no use of firebase.js either. We will be learning the faster ways to code this functionality in the near future.

Have to say I'm a little proud of myself, in class we saw examples of a GET and POST method, and at home I was able to figure out DELETE (and yes, I did delete the entire database on my first several attempts to get it working) and PUT based off that; then merged the four options into one function. Full CRUD achieved 2 days after my introduction to databases.

Tonight I do it all again, adding another couple interesting pieces to the mix.

Today in class we also got better at laying out a project ahead of time, separating out and documenting View and Model before touching Visual Studios, talked about abstracting functions, and learned how to GET just what we actually need from a database rather than retrieving the entire thing.

If all this sounds like a lot of work, it is, the last two days I spent 4 to 5 hours each day on homework, after a full 9-to-5 days in class. But if you put the work in, it pays off.



Tuesday, April 8, 2014

I'm famous!

Okay, actually, I appear for about 1.5 seconds in this youtube video.  But Coder Camps should be famous!

Week 2 is on!

It had to happen eventually. Yesterday was the first weekday since I started at Coder Camps that I didn't blog. Yesterday I literally lived the Coder Camps mantra "eat. sleep. code."

So here's the make up post.  What did we learn yesterday? In the morning we covered Bootstrap. Learning what it is (that much I already knew), how to install it on a Visual Studios solution, what its dependencies are, and of course, we got in some practice using it.

In the afternoon we talked about object constructors and prototypes. This was another example of how expert instruction really helps. I've used both object literal notation and object constructors before (and a little bit of prototypes) but I only had a partial understanding of how to computer treated them differently.

Yesterday drove home how, especially when dealing with large numbers of objects, using prototypes to define common methods can result in significantly less memory being used. The trade off is that that call of that method on any given object will execute slightly slower. For client side code this is a bargain of a trade off as the speed difference will, general speaking, be undetectable to the user, while the memory difference can be significant.

On the server side, where speed is a larger factor you might create the object at need with methods including, foregoing methods in prototypes to obtain the more efficient execution, then destroy the object as soon as you no longer need it to manage memory.

Lest I forget, we also had an aside on JSON and XML.

Next we practiced as a group, creating a simple app to implement CRUD*, using object constructors.  Our homework, and the reason I had no time to blog last night was to finish the app - it still needed delete and sort functionality, and more CSS styling when class was done for the day. Then create another app on our own that did essentially the same thing as the first one ("code pushups" per our instructor).  Oh, and reading on API's and AJAX.

Not bad for day one of week two of camp huh?


* CRUD: Create, Read, Update, and Delete. Four essential functions of a web app.

Friday, April 4, 2014

What I learned in high school, that I use every single day of my life.

Week one completed at Coder Camps! Today we moved into the new office space at Coder Camps, and as always learned a huge amount of information. Instead of the usual daily recap, tonight I'm reflecting back on my high school computer science courses.

I took Computer Science all four years of high school. We coded in BASIC (freshman), turbo Pascal (sophomore and junior), and C++ (senior year). More importantly, we learned to use algorithms and to problem solve. People often complain about learning things in school they'll never use in the real world but with Computer Science, application is everywhere. Right now I'm pursuing a new career path as a software developer, but I've used the principles and modes of thinking I learned in those classes in all aspects of my life, and in jobs that had nothing to do with coding.

Today at Coder Camps an exercise referred to "stack" and "queue."  These are just ways of organizing lists of things.  A Stack is like a stack of plates.  The last one you put on the stack is the first one you take off when you need a plate.  A queue is like the line at a movie theatre (or if you are from the UK, a queue is... just a queue). The first person in line is the first one to get tickets and get out of the line.

These concepts can be referred to as LIFO and FIFO - "Last In, First Out" and "First In, First Out." Can you tell me if a Stack is LIFO or FIFO?  What about a Queue? Think about the analogies I mentioned for a moment and you'll get it!

In Computer Science class these were important things to know if you wanted to understand how to tell the computer to store, access, sort, and otherwise manipulate data. At the time, I didn't have the life experience to see how these or any of the other concepts I learned would apply to anything else. But it's valuable to remember that computers are tools - they help us accomplish certain tasks more quickly, more easily than we could otherwise. We take advantage of their vast memory and lightning speed but aside from these advantages of scale, they can't do anything that you or I couldn't do ourselves given sufficient time and effort. Okay, yes, computers allow us to do many things we could never, from a practical standpoint, accomplish, but that doesn't mean those things would be impossible without computers, just impractical.

All that is to say - every day in life we face and need to solve problems, on our own, with the help of others, and with the help of technology. And Computer Science teaches you to be a better problem solver. There's no end to the value that adds. So thanks high school, you really did teach me something really and truly useful!

Thursday, April 3, 2014

What's more important: knowing what? or knowing how?

So what did we learn today at Coder Camps? As always, quite a bit!

We worked with multi-dimensional arrays and discussed objects. We went over object literal notation and started a new project to put the new knowledge to use. Oh, and more Coderbyte problems as well. Today one of the problems required (well, I'm sure there are always other ways, but they wouldn't have been pretty) the use of a recursive function call in order to push all the possible combinations of one array of numbers into a new array.

There's a difference between knowing what you need to do something and knowing how to do it. Fortunately, we don't have to program in a vacuum and really, its the former that's the key skill in coding. There will always be new problems, and you'll never memorize every possible method and technique out there - yes, the more you know the faster you can work, but the most important thing is to know how to think through a problem and break it down until you can see what resources you'll need to solve it. Then, finding and applying those resources becomes much easier.

After a day like today (hard but good!) I'd like to say thanks, first and foremost to my paired programing partner - bouncing ideas off each other and catching each other's bugs makes us both better coders and problem solvers.  Also on the "thank you" list - Google, your search algorithms make my life so much easier, and Stackoverflow - you're up there as well.

Wednesday, April 2, 2014

Never Just One Way To Code

Time again for my nightly recap. What did we do today at Coder Camps?

After reviewing yesterday's codebyte projects, and our morning stand-up; we talked arrays. Shift and unshift for adding and subtracting from the front of the array, push and pop acting likewise for the end, and splice and slice for manipulation anywhere in the array.

Then followed more coderbyte problems to solve in pairs; switching off frequently to practice version control with Git. Either these are getting easier or we are getting better! Actually, they both are true, they were overall easier challenges than the first ten, but we're also learning a huge amount every day.

In the afternoon we started working on a simple To Do List page that has a text input and submit button. Submit an item and it's added to a list. Click an item on the list and you can toggle a strikethrough effect on it. My partner and I also worked on adding buttons to each list item so the user can delete the item, shift it up the list, or down. (you can see our code on GitHub here)

It's nothing fancy but its our first in class project that integrates Javascript, HTML, and CSS, requiring all three to function properly.

Oh, also we learned our Fourth Rule of Javascript - Always define your functions like this:
    var myFunc = function() {}. 

There are (that I'm currently aware of) two other ways to declare your functions. And, of course, this is our rule, not the rule, there are other viewpoints on the subject. However, this is a very safe way to code your functions, which may result in fewer bugs than other formats. And I'm all for that.

One thing I notice every day is how many different ways there are to solve the same problem. And rarely is there a "best" way. One way may be easier to read, another more efficient for the computer to execute, while still another way makes the code more flexible when you have to modify it in the future. Right now I'm just enjoying seeing all my classmate's different approaches - helping me realize new ways of approaching and overcoming problems; which is what it's all about. Awesome.

Tuesday, April 1, 2014

Rules of Javascript, RegEx, and more, oh my!

Another day at Coder Camps, another huge upload of info into my brain.

What did we learn today?

The first rule of Javascript (at least for us) - Use "use strict"; in all your functions.

We actually learned the second rule yesterday - Always declare your variables at the top of your function.

And the third rule - Always define your functions before you call them.

But wait, there's more!

We discussed the Agile mentality, including a warning that the paradigm has been somewhat diluted in recent years, and had our first stand up meeting.

We talked about RegEx a little early - in working yesterday's coderbyte problems a couple of us, self included, found some RegEx code on stackoverflow that helped us solve the challenges - so even though this might be a bit "advanced" for our level, we got a quick overview and got links to some resources to learn more.

Then we went over version control a la Git and connected Visual Studios to our github accounts. Which transitioned nicely into discussing licensing.

Next it was time for more coderbyte problems (6-10 in the easy category) and pair programing. Which, of course, was a perfect way to practice commit, push, and pull with github. Later on in the program we'll also cover Team Foundation Server.

Oh, not to be forgotten, we went over how you can return a function and thereby gain access to it's scope outside of the normal boundaries set by Javascript. My first question was - okay you return the function and assign it to a variable, then you change the value of a variable inside the scope of that original function, then call the function held in your new variable to access that variable. Will you get the value that existed when you assigned the new variable, or will you get the current value assigned in the meantime? Answer - you get the current value.

Okay, if you don't code, you probably didn't follow that. My apologies, but translating concepts like this into day to day english may take me some time, more text than I'm prepared to write currently, and may not really interest you if you don't like to code. Suffice it to say - its a concept I wouldn't have thought of on my own, and yet, given that functions are first-order objects in Javascript, it makes perfect sense once you see it.

Homework is done for the day, well almost done, I just realized when writing this that I didn't follow the first rule of Javascript when I wrote my functions today, so a few quick edits to make then maybe I'll look into RegEx some more &&/||* read some javascriptissexy.com.

* - && = "and" || = "or"