?

Log in

No account? Create an account

Previous Entry | Next Entry

sunday

I slept through most of the day today after staying up very late last night for no apparent reason. I got in bed, realized I wasn't at all sleepy, so got back out of bed and stayed awake for another seven hours.

and then, passed out. I mean I lost consciousness before I could even put my feet up. one minute I was reading and the next minute I was having some weird dream and then waking up with my glasses in my hand (I took them off?) and my chin buried deep in my chest. feet flat on the floor. four hours had passed.

then I got up to go to the bathroom, was playing a game of solitaire on my cellphone, blinked, and suddenly the game said I'd been playing for an hour. I looked at my watch. an hour had passed during that blink. oddly, my ass was not numb. I got off the can and went to bed.

I'm going to be a real riot when I'm old.

now I'm going to study Objective-C until I pass out again. main reason I'm still studying it is that this particular book is so far the best book on Object-Oriented Programming that I've tried to use. all the others teach you expressions and loops and all of these procedural things before introducing this mysterious and tricky entity called the "class" and its "methods" and then give you this weird syntax on how to invoke the gods objects that each class can produce, without ever really telling you that, you know? you can take all those procedures you just wrote and make methods out of them and voila: reusable objects.

this one was just like, look, here's a class, here's how you make an object out of it, and from now on were going to confine most of our programming to writing methods and then calling them instead of creating dozens of little procedural programs that don't have anything to do with each other.

if you know what I'm talking about you might see how this is a much much better approach. if you don't you don't care and probably never will but I'll just say I'm happy and it's useful so I'm going to try actually to finish this book because it is working so much better than all the others.

then it's back to python and reading the manuscript that I'm "editing" when work begins in, oh, 24 hours or so. Objective-C is for fun. :)

Comments

( 2 comments — Leave a comment )
altamira16
Sep. 15th, 2008 02:48 pm (UTC)
Oh god! Talk nerdy to me. I wish we could hang out and figure these things out together. I have a hard time focusing.

I found Java to be a much easier way to learn object oriented programming than C++ ever was.

Are you learning OOP so you can apply it in Python? I notice that a lot of what I would consider the more serious Python is written in OOP style.

I am updating a website to have the same menus on each of a number of pages. I was just cutting and pasting HTML when it occurred to me that this is a bad idea because once I want to change one thing, I will have to edit a bunch of different pages. I am doing the editing with vi. One thing that occurred to me was to have the various sections in PHP files and import them. Are there other alternatives that you think are better?
eriktrips
Sep. 16th, 2008 12:54 pm (UTC)
years ago it seems like it was possible to import chunks of HTML directly into a page with the @import statement, but it seems only to work for stylesheets these days--or I can't find anything online about importing other HTML files into your main page. so I guess these days PHP is probably the most efficient way to do that. you'll have to make sure that PHP is running on the server hosting the site, of course; usually the default configuration file provided by the hosting service is sufficient if you aren't doing anything fancy.

ETA: totally hit return too soon.

I'm trying to learn OOP because it seems like just about every programming language utilizes it, and that most software development is done in OOP now unless one is working on obscure engineering software. in any case, every programming language book I've encountered so far has its OOP section buried in the back, so I assume that they think it is of some value and I guess most think it is too "advanced" a concept to roll out right at the beginning. I'm liking this Objective-C book though. I don't know the significant differences between Obj-C and C++. too many damned C's.

I also need to learn Javascript I guess. I've been putting it off for years now but almost every site uses it. I usually just "borrow" somebody else's when I need it. There may be a way to make an HTML template and include it with Javascript, but I don't know offhand whether that's really the case.

Edited at 2008-09-16 01:01 pm (UTC)
( 2 comments — Leave a comment )

Tags

Powered by LiveJournal.com
Designed by chasethestars

Latest Month

March 2012
S M T W T F S
    123
45678910
11121314151617
18192021222324
25262728293031