Tag Archives: python

Well, hello HTML, CSS, and JavaScript! (My long journey to literacy.)

I started learning PHP as I mentioned in my blog entry a few weeks ago. And by started, I really mean spent a few hours one Saturday afternoon writing a few lines of code. I saw some similarities between PHP and Python, but also noticed that the syntax was noticeably different. As a novice, I would liken it to an illiterate trying to learn Spanish after only having built an elementary knowledge of English.

Again, I consulted my friends who actually code for a living. Given my goal of wanting to put out a prototype of what I eventually want a more skilled programmer to build for me, they encouraged me to brush up on HTML and learn a bit of CSS. To do that, I went to Codecademy which I test drove when it first came out last year. I got through HTML and CSS pretty quickly. I spent a combined total of 30 hours over two weekends at a local Starbucks. It was fun. I am by no means an expert and whatever I can build looks rather unprofessional. Maybe even ugly, but I can say that I know how to build and design– and I use those words loosely at this point– a website from scratch.

(Image from: Get a Member Site)

So you might be thinking that I am now back to studying PHP. Not true. I am actually going to be focusing on JavaScript. This is mostly because Codecademy has more lessons for JavaScript than it does for anything else. It actually doesn’t have anything for PHP. I am OK with this change actually. As someone who is a novice and is concerned mostly about front-end development, I think a combination of HTML, CSS, and JavaScript is fine for now. I will pick up PHP and Python soon. What matters to me right now is that I am enjoying learning new languages and building things using what I have learned.

I found this discussion thread on Stack Overflow, which helped me make up my mind to concentrate on HTML/CSS/JavaScript. I’m not looking to switch jobs and become a programmer, but it appears that there are similarities between the Eddie’s friend and me.


(Image from: Wikipedia)

This is going to be a long journey, but I’m enjoying it so far. I don’t mind sacrificing my weekends.. for now. Learning to code is a fun, inexpensive hobby. Back to coding with a tall ice coffee in my hand.

By: Jonathan Lee
Twitter: @hi5at5


Why I’m giving up learning how to code (well, sorta’).

I’ve been trying to learn Python for a while using Learn Python the Hard Way. I made some progress, but it’s not working out for me. I had gotten to the point of being able to write a decent “game” in command prompt. But let’s be serious, it’s not really a game if there are no colorful characters or flashing lights. No one wants to stare into a dark box and type in numbers and answers to my questions no matter how funny they are. This is 2012, not 1982.

It’s hard to admit defeat to Python because I hate to lose. I was committed and went through the lessons regularly, but as they got progressively more difficult my progress slowed exponentially. Yes, I can make lame excuses about life being busy, but everyone’s busy. I consulted with my friends who actually know how to code and they told me to download that, set up this, and warned me that even with all the tools it’s just going to more difficult learning Python on Windows than it would be on Mac or Linux.

So yes, I am admitting defeat. You win Python, but only for a short while. At the recommendation of a friend who’s built many successful website, mobile apps, and even hacked into the network of a large institution (which shall nameless because he told them immediately and made their network stronger), I am going to re-start my programming journey with PHP. It’s an older language, but I’m told it would be easier to start with for a complete novice like me. I’ve demonstrated that I suck at coding so I’ll take his word for it.

So technically, I am not really quitting. Me, quit? C’mon, you’ve got to be kidding. I never quit! I hate losing more than I like winning. I’m going after your older cousin first and then I’ll be back for you, Python.

I think I just need a re-boot. Once I get comfortable with PHP and am able to build something I can share with the world, I’ll be back. Oh yes, As T-101 once famously said, “Hasta la vista, Baby.”

By: Jonathan Lee
Twitter: @hi5at5

Why I am learning how to code

I’ve decided to learn how to code. I’ve been teaching myself Python over the past couple of months. The progress has been much slower than I expected, primarily because I don’t have enough time during the week to dedicate to coding. In fact, I only have a few hours (at most) on the weekend. Unfortunately, life happens and I get distracted sometimes.

Why am I learning how to code? Simple. I want to be able to build stuff without having to depend on someone else. I don’t expect to have a second career as a programmer. I don’t expect to code full time at all. I just want to be able to prototype ideas and mainly just hack stuff together. Plus, it would be awesome to be able to help out my engineering team when I finally get my own company off the ground someday. I need to be able to communicate with the engineers. Therefore, I am learning how to speak their language.

I remember learning Mandarin in college. It was an arduous yet fun process. It was fun to be able to communicate with the local taxi driver and shopkeepers in Mandarin, albeit imperfectly. I could always understand more than I could actually speak it. The same is the case with Python. I can understand more complex code than I can write, for now anyway.

Here’s something very simple I wrote over the weekend. It’s really elementary, but I plan to build on this and create an interactive “game” over the next month or two. I am curious what I am going to come up with!

print “Let’s figure out what you would be if you were a number.”
print “To do so, I’m going to ask you a series of questions.\n”

gender = input(“If you are a male, please enter 1. If you are a female, please enter 2. If you are unsure, please enter 3:”)

if gender == 3:
print “I’m terribly sorry, but I cannot give you a number.”

elif gender == 1:
height = input(“Enter your height in inches:”)
weight = input(“Enter your weight in pounds:”)
lastname = raw_input(“Enter your last name:”)
malevalue = int(height) + int(weight) + len(lastname)
print “Your numerical value is”, malevalue

elif gender == 2:
height = input(“Enter your height in inches:”)
weight = input(“Enter your weight in pounds:”)
lastname = raw_input(“Enter your lastname:”)
femalevalue = int(height) + int(weight)/2.2 + len(lastname)
print “Your numerical value is”, femalevalue

print “That is not a valid option. This calculation works only for those who can follow directions!”

– from xkcd.com