Tuesday, August 24, 2010

Plans, plans, plans . . . part 1

It's been a pretty interesting and chaotic last week with the programming. I've gone through the manuals and "Dummy" books, but I've decided to really focus on taking paths in which I can get productive immediately. I'd like to start work on a series of small programs that will become of use to me in short time: that is to say, I'm approaching this as a stone carver now, and the architect of the pyramid later. I'm chipping away at the stones, only dreaming of the large structure that could be built from small, efficient building blocks.

So, it may not be wise to build small programs quickly. In fact, if a programming language is the raw material (and the machine code the physics dictating what is possible), I'm taking my time now understanding that raw material. I'm delving into Linux, Apache, MySql, and PHP in a bit of a chaotic, experimental fashion, investigating when I hit road bumps, looping back to further understand the design or form of this or that. I can't exactly define what I've learned, but to return to the pyramid-building metaphor, I'm learning the tools and learning the stone, feeling out the right way to chip away at the problem, to form a perfect block from stubborn rock, to stack these solutions in a nice order.

I decided to turn away from jumping into MySql and PHP headfirst by using a web host control panel to write scripts because I want to get a feel for where these systems are coming from: how they function, how they're designed. It's easier to work with something when you can determine its size and scope, when you can have a rough handle on its capabilities, on how it moves. So from my first week with MySql and PHP I redirected my focus to the baser systems, that is, Apache, and beneath that, Linux.

Biggest road bump thus far is the installation of Apache and MySql on Linux. So the plan is to systematically learn enough about Linux to understand how it works with Apache.

More later, my coffee is having no effect and that must mean it's time to crash.

Saturday, August 7, 2010

Rolling Title.

Picking up speed here. I've been negligent in my Java learning because I have to do it when I'm home, and let's face it, after 12 hours on the road I want to get home, play with my kid, and pass out.

Ah, but this is where the Android phone is a handy tool. I can code any time, anywhere. Using the web browser and TxtPad Lite I'm good to go. I write and review code on TxtPad, and upload it via my web host's control panel.

There is a down-side though. Yesterday I was at Seven-11 buying milk at 10pm (necessary to get my daughter to go to bed), and figured out why some php I was working on wasn't playing nice with MySql as I was standing there with the freezer door open. So instead of checking the expiration date, jogging to the counter to pay and rushing home to get my daughter her bottle of milk(she drinks enough man, trust me, the kid isn't starving. This is more a matter of Mom being tired and wanting to put her to sleep), I grab the gallon of milk with my right hand and the Android from my pocket with my left. Pull up the local file of the code, drop the milk onto a box of Slim Jims, and start coding away.

After ten minutes and feeling some odd looks (and swapping the now warm milk jug for a cold one), I jumped in my car and by the time I got home it'd taken as much time as if I'd jogged there and back.

"Did you stop for a drink?"
"No."
"What took you so long then?"
"I figured out some bad code and had to correct it."
"In 7-Eleven?"
"Yes."
"Are you $%#*ing serious?"

Monday, August 2, 2010

You .:. Step Forward

BlueJ . . . I'm still messing around with . . .

But the point here is to do 5 programs before starting on Knuth's _big_ book. Well, I figured if I'm going to put the time into making some programs at least one of them should do something that will make my life better(isn't that the point?).

So, I've gotten myself all riled up on the idea of building a parts inventory database for my service company(dental equipment service, by the way, if you're curious).

And so, a new obsession was born("The word geek is a slang term, noting individuals as "One who is perceived to be overly obsessed with one or more things including those of intellectuality, electronics, etc."): and, having a new obsession - this time not about researching the whole history of Mastodon without buying a single album of theirs because I liked a track of theirs on the Brutal Legend soundtrack - that can actually make me more productive in the real world, I've pretty much dived in head first.

Now, knowing that I had this grand idea to create a fully editable and always available parts inventory, and being as excited about this new project as anyone with a geek-disposition would be, I pursued this project by researching every available programming language out there. Now, I was most impressed with the potential of Python and Perl, but I had to be realistic - after a lot of searching it's pretty obvious that php was made for web development, and it easily works with mySql. If you're just starting out like me, go with what will be easiest to learn. Then, when you know what it is to be a coder, you can really evaluate Python and Perl in real terms.

So, I've been playing around with SQL the last week. Cool stuff.

BlueJ . . . what the heck is that?

I've started down the second road as laid out by Sun Microsystems, and that is using BlueJ, which is a neat program that keeps you from typing into the console . . . instead you create and experiment with programs using a graphical interface.

I'm reading "Objects First with Java: A Practical Introduction Using Java" along with BlueJ to have a structured learning plan that's doing the trick . . .

I actually really like BlueJ so far, I can see where they're going with these lessons, and I get why they're using a GUI (graphical user interface, for those readers coming from the same place I am), giving the student a visual reference for getting a better grasp of classes and instances, very important concepts in Java.

All these objects and instances are subject to a hierarchy, and after the first two lessons, I can definitely say I have an understanding of how these objects relate to one another. I love it, and I'm glad my friend Ryan referred me to Sun/Oracles's "New to Java Programming Center." As well as a simple way to comprehend Java's objects, classes, and instances, it is also a great introduction to understanding the types of data that can be used in methods which allow these objects to interact with each other. The programming language has to know what type of data you're inputting . . . integers (whole numbers), strings (text), boolean (true or false), etc.

I really recommend skipping Greenfoot if you're interested in programming. My suggestion is to get yourself a copy of Objects First with Java. The great thing about using the book as a guide is that outside of the standard lessons, you are also presented with challenges to figure out some things for yourself once you've learned enough. This is my favorite part: where the lessons themselves take up 30 min of my time or so, the challenges have had me experimenting for hours. I think this a great format on the author's part. If you really have a passion to learn programming, you do enough to get your footing and then you're encouraged to play around and do your own thing!