Python and Scripting

I learned programming on my own from youtube and I learned how to make an android app with java and xml and I felt like I knew a decent part of what programming is.

I was so fucking wrong.

Learning how to program on your own is great, but you will be ignorant to the basics of programming that they teach you in college. It’s hard to learn programming in a class room. You have to write code to learn code; that’s why I was able to learn enough to make something in my bed room. But college teaches you the fundamentals. After working as an intern dev for a month I realize how ignorant I was to the fundamentals of programming. While making my DBZ app I was sort-of frightened of command-prompt scripts and of APIs. I didn’t understand how important those aspects are to programming. I avoided them at all cost and I got very frustrated when ever I was forced to deal with sh scripts. I didn’t want to use any other code besides the code I wrote myself. After a month of writing scripts I see how silly I was.

All programs are scripts and they all are run by the sh. That’s why when you try to do more complicated things with your mobile app you will crash hard into the sh brick wall. Google and stack-overflow are the reasons why I was able to make my app. Other programmers are very social and very willing to help. Helping others code helps you learn more about your own code. It makes you more powerful and wiser. When I tried to make my second app and I needed to use other people’s apis I was so lost and confused. I have no idea what I was doing and why things weren’t working. I can’t imagine how long it would of taken me to learn if I hadn’t of gotten this job. I needed to learn the basics. I had skipped the basics and went directly to intermediate with the help of stack-overflow.  So when I wanted to use things like HTTP and OAUTH and parsing data I was completely in the dark.

I’ve used so many different new languages in the past few weeks. Javascript, HTML, CSS, Ruby, bash(? is that a lang?). It has really shed some light, and I’m more powerful than I was a month ago.

But yesterday…


I’ve been writing pure sh scripts for a few weeks. Then my boss says, “Do this in Python”. It was a project that he really wanted me to get done; to complete the project with a new language would normally be irksome but I’ve been using so many langs that they all seem so similar now. Or maybe I feel like it can’t get any harder than it is.

So writing my first real script in a new language. Wow, was that an experience. I had to manipulate big data and that made me learn what scripts are for. I learned what all programs do essentially; take data and return data. It all basically comes down to that. Python did me a favor and does the same things sh can do but with out all the unreadable code.

instead of       echo ” test test test ” | tr -d ‘ ‘

you can say    print line.strip()

Python makes scripting so much more pleasant. There is one thing I really don’t like about python. Whitespace matters in python. Really annoying because most OOP languages don’t use whitespace. It’s really annoying. Needing to turn on invisible characters just to know what’s indented is lame. It makes up for it by being fairly great. More pleasant looking than ruby. Maybe I will like ruby more once I start using rails.

Now I’ve been writing scripts for a month and only just today do I finally feel comfortable. I’m far from good. I’m very very bad. But today for the first time in weeks; when I write a script I feel like I’m writing DBZ HD again. I have the tools, so I can finally start fixing the problems.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s