Register to post in forums, or Log in to your existing account
 

Post new topic  Reply to topic     Home » Forums » Zugg's Blog
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Oct 12, 2004 5:30 pm   

Back to programming
 
Chiara's relatives are gone, so I'm back to programming this week. Unfortunately, this weekend we have to leave again to visit her father who is about to leave the US for a new job.

Fortunately, once we get back from that visit, I'll be able to go into "extreme programming mode" for the end of October and most of November.

I'm going to try as hard as I can to have something really useful released before the holiday season.
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Tue Oct 12, 2004 5:56 pm   
 
eXtreme Programming? :D. That sounds like "working hard" and I have realized I have worked really hard on some of my spare time projects. Sometimes even more than I expected when I began with them.

Why? Why do I work with such a dedication on those crazy, spare time, projects? Then when doing an exercise in a book to learn something I can stare at it for hours. It doesn't make much sense. When doing a spare time project I can have my desk filled with books. Usually working like crazy.

Today I realized that the reason might simple. Working on a project can be really fun Mr. Green. Sometimes though... there is that bug hiding deeph beneath the code, waiting to surface. Suddenly you find yourself adding breakpoint, after breakpoint. Wandering around in the house pondering on what might be wrong. After hours, and perhaps even days of annoying attempts to fix it you suddenly just give up or take a break from it.

This happens to me sometimes. Then suddenly after having given up, the solution to the problem comes from nowhere. What is the odd thing is that it is kind of realizing stuff like this that is so fun at times which makes programming fun.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Oct 13, 2004 6:10 am   
 
Yep, that's exactly what keeps me going. Those moments when something comes together and works the way you have dreamed it makes it all worth while. But sometimes those horrible "can't find the bug" moments can really get bad too.

Today was a bit like that. I spent most of the day tracking down a bug in the 3rd party TreeView component that I'm using that caused drag/drop not to work. I really hate debugging other people's code, and continue to wonder in amazement that such basic functionality doesn't work. Then again, at least this was a free component. I really get mad when I find huge bugs in commercial code.

But then, when it works, it's really sweet. And Zeus/eMobius is really building up to a huge payback in this sense. All of the tedious work on the low-level architecture is resulting in a very stable platform for development. In zMUD, it seemed that everything was tied in with everything else and nothing was very modular. I'd make a change to the parser and break all sorts of wierd stuff. But in Zeus/eMobius, the pains I've taken to keep it all modular are making it really easy to focus on one particular section of code without causing any side-effects to other modules. And when something is improved in a low-level infrastructure routine, everything seems to benefit from it.

One of the most important things I have learned is to take little breaks when things get really frustrating. Each time I find myself completely stuck and frustrated and keep banging away thinking that I'll fix it. Then I take a break for dinner and when I come back I suddenly can fix it all very quickly, with much less frustration. The concept of a "mental block" is *really* true.

Regarding "extreme programming"...

Right now I am in "normal programming" mode. This means that I do email in the morning, take a lunch break, program all afternoon, take a dinner break, finish up whatever I can to get to a good stopping point and then either watch a movie with Chiara or play some video games. I get about 6-8 hours of programming a day in this mode, most of it during the afternoon. It's a good balance between work and family time and gives me time before bed to unwind with a video game or book so that I don't think about programming all night long. But the afternoon isn't my best brain-time.

In "extreme programming" mode things are very different. I minimize the amount of email that I do. I pospone email and do it once every 5 days or so. Doing email really breaks my programming mentality. So, most days I don't do any email. I start right away in the morning with programming, usually working on stuff that I've thought about the night before. I take a lunch break and then program more in the afternoon. A dinner break, and then I just keep programming. I program until about 1am and then go to bed. I usually toss and turn thinking about programming during the night. I don't sleep as well. My best programming time is from about 8pm till 1am, so if I have to take any other breaks, I take them in the afternoon.

In this mode I get about 10-12 hours of programming. I totally immerse myself in it. The first couple of days are frustrating, but once I get into the "groove" I can get a *lot* done.

The downside to this kind of mode is that family life gets mostly ignored. I haven't done much work in this mode since I got married. But Chiara understands the need for this right now in order to get eMobius into a release status. We'll make up for it during our normal break around Christmas.

So, there is quite a difference between these two work modes. The first mode is sustainable over a long period of time. But it's hard to gain any sort of momentum. The second mode can be really fun at times, but it cannot be sustained. It leads to burnout and it causes family troubles. But sometimes it is necessary to get over a hump in a project and I think eMobius is going to need that kind of attention before I can release the first beta version.

In any case, it should provide for some very interesting blog entries. I'll be going between extremes of frustration and excitement, and you'll be able to read all about it here.
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Wed Oct 13, 2004 8:35 am   
 
Zugg wrote:
Yep, that's exactly what keeps me going. Those moments when something comes together and works the way you have dreamed it makes it all worth while. But sometimes those horrible "can't find the bug" moments can really get bad too.

Today was a bit like that. I spent most of the day tracking down a bug in the 3rd party TreeView component that I'm using that caused drag/drop not to work. I really hate debugging other people's code, and continue to wonder in amazement that such basic functionality doesn't work. Then again, at least this was a free component. I really get mad when I find huge bugs in commercial code.

Bugs, bugs ... Everywhere are those bugs Mad. I remember showing a game I made to a friend. It was "perfect" and I had tested it in every possible way for hours. Whithin a few seconds my friend crashed it.

It turned out I had learnt a pattern which I used when testing the game. That way I avoided the bug without even realizing it. The bug was kind of stupid too Smile.

Quote:

But then, when it works, it's really sweet. And Zeus/eMobius is really building up to a huge payback in this sense. All of the tedious work on the low-level architecture is resulting in a very stable platform for development. In zMUD, it seemed that everything was tied in with everything else and nothing was very modular. I'd make a change to the parser and break all sorts of wierd stuff. But in Zeus/eMobius, the pains I've taken to keep it all modular are making it really easy to focus on one particular section of code without causing any side-effects to other modules. And when something is improved in a low-level infrastructure routine, everything seems to benefit from it.

I am working on learning C++ at the moment and I have become quite crazy when it comes to modularity. Sometimes I tend to break my own rules but I have come up with a few things that I am quite happy with.

The game I have been playing with had become way too dependant on DirectX for the graphics, but I realized that by abstracting DirectX away to just one module would let me change the graphics library should I want to.

Some things get dependant on eachother even if you don't want to though. Like in the case of a lexer and a parser the parser is dependant on the lexer retrieving the correct tokens. The same lexer might not be suitable for another parser.

Quote:

It's a good balance between work and family time and gives me time before bed to unwind with a video game or book so that I don't think about programming all night long. But the afternoon isn't my best brain-time.

No muds? Wink. I find myself play less and less MUD. I noticed I was too addicted that I didn't learn programming very well. Still a lot of programs I have made are MUD related Rolling Eyes.

Quote:

In any case, it should provide for some very interesting blog entries. I'll be going between extremes of frustration and excitement, and you'll be able to read all about it here.

You'll be in XP mode until Christmas? Auch now I feel really guilty. I must get some ... a lot of work done Smile.
Reply with quote
Nezic
Apprentice


Joined: 10 Oct 2000
Posts: 119
Location: Colorado

PostPosted: Wed Oct 13, 2004 4:49 pm   
 
I was stuck for about two years on how to handle(or even conceptualize) the scripting and state machine aspect of a hobby RPG game I've been tinkering with using C++ and allegro(www.allegro.cc). Since the scripting of dialoge, movement, effects, etc is the main point of my game, it was *extremely* frustrating to not be able to figure it out. It has gotten to the point several times where I would put off any work for several months because of burn out. (I also spent many tormenting hours trying to force a smooth framerate.)

About a month ago, I finally made a mental breakthrough and I can understand *much* more clearly what it would take to do what I want to do.
Great, right? Well, it turns out that I'm in the middle of what's been the busiest semester of school I've ever had, and haven't had time to even *think* about working on my poor little RPG game. It kind of puts me at the opposite end of the frustration spectrum that I know what to work on, but can't. Rolling Eyes

Nezic
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Oct 13, 2004 5:38 pm   
 
Oh, I know exactly how you feel Nezic. I'm in that state all the time. I always have many more things I'd *like* to work on, but can't. Right now I've got ideas for zMUD, ideas for zMapper, and ideas for this website software, but I have to put those ideas aside (write them down) so that I can remain focused on eMobius for a while.

I think that situation actually just gets worse and worse as you get older Wink
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Wed Oct 13, 2004 6:42 pm   
 
Nezic wrote:
I was stuck for about two years on how to handle(or even conceptualize) the scripting and state machine aspect of a hobby RPG game I've been tinkering with using C++ and allegro(www.allegro.cc). Since the scripting of dialoge, movement, effects, etc is the main point of my game, it was *extremely* frustrating to not be able to figure it out. It has gotten to the point several times where I would put off any work for several months because of burn out. (I also spent many tormenting hours trying to force a smooth framerate.)

You know that it took them 18 years to make the first Fortran compiler? Making a compiler was much tougher back then than it is these days though. A lot of the theory about compilation hadn't been discovered back then.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Oct 14, 2004 4:57 pm   
 
That's true. If anyone has a chance to take a college course on compiler writing and design, I can highly recommend it. Back when I got my degree in Computer Science many many years ago, this was one of the classes that has helped the most in later software writing. A good "algorithms" class is also useful, although with all of the focus on O() completion proofs, it can get a bit dry. I'd also imagine that these days a good object-oriented programming class would be useful. Back when I got my degree, OO programming hadn't been invented yet, so I had to self-learn this concept. It's such a different way of thinking about programming that it's probably another good topic for learning in class rather than from a book.

I've looked at a lot of 3rd party code, both in Delphi components, and in Internet scripts such as PHP stuff. I can usually tell if the person writing it has any formal training or if they are just self-taught.

Anyway, somewhat of a diversion of this topic, but if anyone has a chance and the money to take actual college classes, you'll find it very useful for any future career in software development.
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Thu Oct 14, 2004 6:24 pm   
 
I have learned some compiler theory by studying some of it myself. The "Dragon Book" is pretty good (Compilers: Principles, techniques, and tools). It can be a bit tough to read though. I remember it took me a lot of work to have an idea how LL(1) parsing works.

Now I am using LL(1) parsing almost in all programs Mr. Green. I find LR parsing to be more difficult though. Mainly, I think, because the chapter has a lot of definitions.

I have heard that a new dragon is in the works. Isn't it amazing? Very Happy Compiler theory must once again have advanced. This time I think it is going to talk about OOP, and just-in-time compilation.

Zugg do you have the green or red dragon book?
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Oct 14, 2004 10:44 pm   
 
A new Dragon book? Cool! Cool

Yep, this was the book I used 22 years ago when I took the compiler class at UC-Irvine. I think it's the standard book for everyone. Another book that I have found useful is the "Writing Compilers and Interpreters" by Mak (Wiley Publishers). It's a bit more updated and has more practical examples vs the theory in the Dragon book. Both of them sit side by side on one of my bookshelves here in my office.

I think an update for OO and JIT would be really useful.

Oh, and my book has the green dragon with red lettering.
Reply with quote
Nezic
Apprentice


Joined: 10 Oct 2000
Posts: 119
Location: Colorado

PostPosted: Sat Oct 16, 2004 7:00 pm   
 
One of the tech electives that I can choose to take is on compiler theory (Principles and Practices of Compiling) and I'm definately considering it. There's a lot of other stuff to pick from, but this one does seem pretty interesting.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Zugg's Blog All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
© 2009 Zugg Software. Hosted on Wolfpaw.net