Tuesday, December 31, 2013

Udacity CS 101

I am a very goal driven person and as 2013 comes to a close, I always plan ahead for things that I want to accomplish in the new year. I had several things in mind for 2014 that I wanted to do that I thought would have the potential to make fairly good money and others that were just cool.


I have instead decided that I need to focus on filling ALOT of missing Computer Science knowledge instead of being so much of the entrepreneur that I typically like to be. With that being said, I will be taking Udacity's CS 101 starting in 2014. Hopefully after that course is completed I will continue on with other Udacity courses. Here's a link to the course: CS 101 . The course is done in Python, but I will also be writing it in Ruby on my own as well.

Last year was such a rush and a constant trying to learn as much and as quick as possible as I could that I felt like I was drowning in CS sometimes. This year I plan on really enjoying learning new things, and not caring how long it takes. I'll give updates on how I am liking the Udacity course as it goes on.

Since I've been getting pretty decent traffic on the blog these days(usually over 10,000 unique visitors per month), I decide to put up one ad on the side of the blog just to see how it went and if it would bring in maybe $50 bucks a month or so. The first day running the ad I made $3.40. I then decided that I didn't want 'Viagra' style ads or religious ads on my blog, so I went into Google's ad sense settings and edited which ads were allowed on my blog in the end removing quit a few.

Long story short after tweaking the Adsense settings for the blog, I have been making roughly $0.03 per day, which is why I decided today to remove the ads. I didn't mind an ad as long as I wasn't in my mind being a 'sell out'. Well no more ads, lesson learned. It was a good learning experience looking up how Google sells batches of ads and stuff.

On a different note, every year my wife picks a word for her year. I decided that this year I would do the same so, my word for 2014 is: Positive. I want to be more optimistic and positive in everything that I do and my entire outlook on life. I hope you have a great new year and that you are looking forward to 2014 as much as I am!

Keep coding peeps!

-Josh

Monday, December 23, 2013

My old arch enemy ' rm -rf ' rears his ugly head again!

Some people are great friends all the time, some people are good friends some of the time, ' rm -rf ' is almost NEVER a good friend :-(

So I made this little html file that called external css and javascript files that hid a scary monster image until a button was clicked. I wanted to show you some cool new things that I've been playing around with lately and show you the little site up and running until I made a HIDEOUS mistake and accidentally deleted the entire folder that had the files.


How?...a long story that is ultimately pointless and boring...it happened :-(


So, you will just have to check these out on your own for now until I make something else to show you:

Get a website hosted directly from your GitHub Repository for free, I never had heard about this or knew about it, pretty cool.
I had always heard of Jekyll but never looked at it, it's cool and worth checking out!
I love Heroku, but when I first made a site and hosted it, the site would take FOREVER to load. I found a cool little trick here: Heroku: Depriving your free dyno of sleep and thought I would pass it along, I have Uptime Robot running on 2 sites of mine now.

All the best peeps, keep coding and have a Merry Christmas!


Tuesday, December 17, 2013

The Blacksmith secret that a "junior" dev uses everyday to stay mentally sharp

For the longest time I wasn't going to admit to anyone that I actually do this much less show you. 4 1/2 months ago when I was shoeing horses for a living, whenever a client was late or didn't show up I would take a golf ball and bounce it off of my 2 1/2 pound rounding hammer to pass the time.

After learning to code and getting hired as a "junior" developer I gave away all of my shoeing gear and equipment to other local blacksmiths and farriers. The entire first month at work as a "junior" dev I would always go home with a headache. I noticed that after lunch I would feel a mental "coding fog",  the stress of a whole new environment and constantly trying to learn as much and as fast as possible was burning out my brain.

One day at lunch I was feeling mentally "tired" and thought back to how I would always feel mentally "sharp" after doing "hammer drills" for 10 minutes while waiting for clients to show up.

I looked around the office found a small hammer and a golf ball that our front end manager had.
I went to an empty conference room and  after 15 minutes of practicing bouncing the golf ball off of the hammer and switching different hands right then left, right then left I felt amazing! I went back to my desk feeling extremely refreshed and very focused. Since then, at lunch I sneak off into a conference room and do 10 -15 minutes worth off "hammer drills"

Every night I work on small projects on my own time to try and improve my coding skills, whenever I get stuck with something or find myself stressing out and having to read something multiple times, I do 5 minutes of "hammer drills" and am able to concentrate much better.

Laugh if you want, yes it's kind of awkward/embarrassing, but there are lots of studies on how "juggling" makes your brain grow and become more focused due to "active stress". I don't know, what I do know is that it works for me, and I thought I would let others know so if you are feeling crazy "coding" stress you could give it a shot.


 


 Don't knock it until you try it! Though if you haven't been shoeing horses your whole life, you might want to try using a wider hammer like a mallet the kind you use for knocking in tent pegs. Give it 10 minutes next time you're feeling stressed and see if it doesn't help you focus better.

Keep coding peeps!








 






Wednesday, December 11, 2013

The Git command every "junior" dev needs to save their butt.

Unless your perfect and never accidentally hit the wrong key when you don't mean to than keep reading.

Most Github articles walk you through some good basic commands others are WAY too advanced and in depth for beginners.  This command is the one to know when you have messed up. After knowing this command, you will have the absolute confidence and ability to not freak out when you do make a mistake.


I was doing front end work last week and made the mistake of getting caught up emotionally in an email from one of my bosses to check on a different site I had just made...BLAH..BLAH..BLAH long story short I ended up making some tweaks to the site that I was emailed about and quickly committed the changes as a "dumb-trying-to-impress-his-boss-noob" developer does.

Now here is where the story actually gets good. 3 Months ago I would have been freaking out and cursing myself under my breath for not being more careful and "measuring twice before cutting once".

However now after committing the coding atrocity I simply typed in 1 command and life was good once again and no one was the wiser to the fact that I had violated every good and healthy safety code check that should be done before committing your work. The magic Git command?



All I typed in was:            'git reset HEAD~1'


That's it! That command is your: "Get out of jail, I messed up with Git command"!



The best part is, its a totally safe command that doesn't erase your work or do anything that you don't want to happen. You are simply resetting the last commit, it doesn't erase anything it simply resets everything to how it was before the commit. You can reset the last commit many other ways, but for me this was a really easy one to remember that hopefully I WON'T need anytime soon  =-)

Please share in the comments what I did wrong, I know I was an idiot but being able to fix my mistake and not having to ask for help from the other developers, like the first month at work. I  realized that other young developers might want to keep it handy as well =-)

Monday, December 2, 2013

Why new developers should write crappy code.

Some things about development are not taught in college, some things about development are not even taught on the job. Some things you are just "assumed" to know, almost as a 'gut' instinct. You can take every great tutorial on How To Code and memorize all of the "Best Practices" but that is no better than simply memorizing the answers to a test in school. At the end of the day, what did you truly learn? What do you really know?

As a junior developer working on a team with a lot of senior developers, I get to spend my lunches listening and learning from them and I am very fortunate and grateful for that. Yes, I got hired  from a very blue collar background of shoeing horses for a living with no college education and although that's great I am painfully realizing that I am lacking any 'gut' instinct. I had simply memorized enough of the 'test' answers to get hired.

How does one develop a true 'gut' instinct for knowing how and what to code? Everyone will give you all sorts of different answers from: You'll get there eventually to Never look stuff up to Always look stuff up that you don't know. I think the answer (at least for myself) is writing crappy code and making tons of mistakes. I think we should encourage young developers instead of learning everything about the best practices with methods right off the bat. Just try to make a little command line game, like Hangman, without using ANY methods.

No longer will the conversation be: "What's the reason why we do 'x' like this or that?" or "What's the best practice?". Young developers will truly KNOW what not to do, and will instinctively go towards better ways of making the code better especially if they know an experienced developer that they can go and ask questions which can also help prevent bad habits.

I know for myself if I don't know why I am doing something I am going to try to make a program not using the thing I don't understand and see what happens. For the last few weeks everyday after work in the evenings, I fire up the text editor and just start making things. I know without time pressure or this is the only way to do it mentality. I have learned so much and am having a BLAST!

I am slightly embarrassed to admit that at lunch today I showed a program that I made on my own time that was giving me an error to a very senior member of our team and the first thing he said was: "Josh this is bass backwards!" and showed me why I was getting the error. That lesson today at lunch clicked in my head and will not be repeated because I had spent an hour last night trying to make the program work.

I know at least for me in my free time I am going to be writing code and enjoying the whole learning process without worrying about if it's the perfect way. I don't think new developers should write experimental code like this obviously in ANY sort of production code base but I think young and upcoming developers shouldn't be pointed to just tutorials. They should just make something on their own regardless of how crappy it is. I think that is how a true coding 'gut' instinct is born.