Tuesday, November 16, 2010

Python, mother foo-er, do you speak it?

Welcome to your nightmare.

Nightmare? Well, nothing's easy, lemme tell you. And to make the dreams come true you gotta face your nightmare. And, baby, am I ever giving you the easiest nightmare you ever had.

If we're gonna write 4 programs, let's start with something that's gonna put us on the first step of Vader-power programming we first discussed. There's a big debate going on between PERL and PYTHON. Now, good friend, you follow my advice. We're going to start with PYTHON - not Java, not C+, not Scooby Doo - no, just Python. And why? Because we got the resources, baby. PERL is the "Swiss-Army Chainsaw," meaning you can anything with it, but you gotta concentrate through the noise. So we're gonna take the more elegant alternative. FYI, Google was first written in Python, so stop your belly-achin'.

And, did I mention that our course is through M.I.T.? Oh, didn't? And it's free?

That's what I thought. Check out these two links. Talk with me about anything regarding your studies. I'll be right here to help you through.

MIT 6.00 Opencourseware.


Curious Reef Resources for MIT 6.00

Don't thank me. Thank our good friend and ninja-ku programmer Ryan Horn.

Stutters, Excuses, Explainations...

So, moved into a house. The house had horrible mold and termite problems. Homeless for a month. Cost me a fortune; couldn't pay for 3G/4G internet. Been of the grid. Way off. Trying to survive.

You get the picture? Good. I'm not giving up on this blog. If I'm away for a while it means that there's a good reason.

So, where are we now? Well, on the path to Don* Grade Geek, I'm realizing it ain't easy. Knuth says you'd better have written 4 programs before starting this book, and from what birds have whistled to me, it's not "Hello World" we're talking about.

So, let's start somewhere . . . reasonable . . .

Tuesday, September 7, 2010

Dumb Ways to Promote Your Blog, Part 1

. . . Get drunk. In front of your girlfriend's mother. Promise to watch "Heat" with her even though your vision is getting a bit blurry. When its apparent that your internet connection is down, and thus you can't watch "Heat" via online streaming, it's probably a good idea to call Optimum Online and get on the phone with a tech guy there. Who's completely sober. Talk his ear off about Blu Ray, Star Trek, and argue with him about how the Bourne movies are the only exception to books being better than the movies based on them. Tell him how awesome your blog is, even though it's only been up for a month and hasn't yet found a focus. As your girlfriend's mother is bewilderingly watching you, it's a good time to stumble around behind the entertainment center, and, as you're talking with the Optimum tech guy about everything but Optimum, make sure to trip over a cable and pull every damn device off the shelf, causing an avalanche of wires, antennae, remotes, modems to fall on top of you. Shrug it off like its no big deal.

Hear about it all goddamn day tommorow.

In other news, I'd like to welcome this blog's first follower. His name's Claudio and he works for Optimum Online. Funny story how he found out about this blog . . .

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!

Friday, July 23, 2010

Ohhhh!!!! DENIED!!!

Donald Knuth (or the Don* of this blog's title), says flat-out in the introduction to "The Art of Computer Programming" that you should have already written and tested 4 programs before you start the book. So, I guess I'll have to do just that.

If I have to pick a language to program in (and yes, I know that the Don* refers to a made-up code in his book, but I've got to pick up something real to do the 4 prescribed "write-n-test" tasks with), then it's got to be Java. I know of it. I worked with it often when I worked with a website design company. I have an Android smartphone, and I'd like to develop apps for that platfrom sometime down the road. So, Java it is.

I've been dicking around with Greenfoot (which is recommended by Sun Microsystems as the jumping off point for people with no experience in learning programming to mess around with to _start_ learning about programming), but here's the thing . . . I'm not into whole "wombat" thing. I think I prefer the "hello world" route.

Anyway, Sun also says that Greenfoot is a good beginning for people _who don't have an interest in programming_. Well, now, that's not me. And I'm not gonna watch those damned wombats running circuits again. So, let's jump right into BlueJ, shall we?

Don* Grade Geek? What the hell does that mean?

Well, it's better than Knuth Grade Geek, isn't it?

I want to be a major geek. Like if-I-choose-the-dark-side-you-better-call-Luke geek. I'm more or less a mechanic in my daylight life, but at night I eat and breathe "geek." I love video games, I read comic books, and when I can't relax I open up a book on the history of the steam engine, or just as likely I'll be watching Diggnation.

So, I fit something like the standard m.o.. But I've been messing around with programming on-and-off (mostly off) since high school, and now I'm 26 and I'm still reading technology blogs and thinking how cool guys like Kevin Rose and Matt Dorey are, when I don't really grasp a thing about programming.

So, I aspire to be a Don* Grade Geek.

"Don*" means "Donald Knuth," as in the guy who wrote "The Art of Computer Programming." That's the 4 volume(and running) book of which Bill Gates said "You should definitely send me a résumé if you can read the whole thing."

The plan is to get through the whole book, with a little help from my friends, of course. And yours, perhaps. So, let's get started.