Posts

My Apprenticeship - Friday, July 30, 2004

This summer I'm revisiting my short apprenticeship at Object Mentor. I'll be posting commentary on all my posts from the summer of 2004 exactly 5 years later to the day. Friday 7-30-04 IntelliJ IDEA 4.5 just came out and there's a been a flurry of emails about how it lets you analyze your code. The Martins (Micah and Bob) are trading barbs about whose code is more redundant. Paul looked some 10 year old code he was working on and it had hundreds of repetitions. I've only just installed 4.5, so I haven't had time to try the new features. Dare I analyze my old projects? The pawn is killing me. My chess program takes the pretty obvious tact of having a ChessPiece interface from which all the pieces inherit. Bishops, Knights, Rooks, don't really need to know about the ChessBoard. You can just give them their move and they'll tell you if it's legal. The ChessBoard will do a check to see if any pieces are in the way of a move. But the Pawn -- What a jerk! Pawn...

My Apprenticeship - Thursday, July 29, 2004

This summer I'm revisiting my short apprenticeship at Object Mentor. I'll be posting commentary on all my posts from the summer of 2004 exactly 5 years later to the day. Thursday 7-29-04 So I was doing one last re-install of Word Press, just to make sure I understood everything that could go wrong -- But apparently there was one more thing. I just couldn't sign in from my laptop when I pointed it's browser at the Linux box. I know I had the right login and password because it worked on the other machine. After spending too much time messing around in the Linux terminal, I went back to my laptop, deleted the cookies associated with that website, and everything was fine. Cookies are a problem. The chess program is proving to be an interesting problem. Everything wants to know about everything else. Must... Manage... Dependencies... "Everything wants to know about everything else" I fight this battle every day. And I continue to fight cookies and other browse...

My Apprenticeship - Wednesday, July 28, 2004

This summer I'm revisiting my short apprenticeship at Object Mentor. I'll be posting commentary on all my posts from the summer of 2004 exactly 5 years later to the day. Wednesday 7-28-04 Not a whole lot going on today. I messed around with Word Press. Paul continues to remove the html from FitNesse. Which is more like storing the html inside methods so that the chance of a typo is reduced -- if you have to constantly add in a bunch of cryptic strings then you probably will mistype somewhere which can cause hard to find problems. However, if you make a method that adds in a html tag, then either every instance of that tag works or fails. The IDE will tell you if you've entered the method correctly, thereby reducing the chance of a typo causing a troublesome error. Susan and Ellen are pretty swamped under the pressure of getting XPAU up and running. David's having a good time with his class, but they're working him like a red headed stepchild. I got to meet Micah...

My Apprenticeship - Tuesday, July 27, 2004

This summer I'm revisiting my short apprenticeship at Object Mentor. I'll be posting commentary on all my posts from the summer of 2004 exactly 5 years later to the day. Tuesday 7-27-04 Today I worked on cleaning up Word Press so that it looked nicer and behaved better. Alex King was nice enough to hold a contest for the best Word Press skins and publish the results here: www.alexking.org/index.php?content=software/wordpress/styles.php For now, 'But Uncle Bob,' is using the 'Dark Fire' skin. I also spent a fair amount of the day figuring out the various features of the program so that I can teach Micah when he comes back. Once you get it working (and, if the server has already been set up for you, that is not too hard) WP is a nifty little program. Tomorrow I think I'm going to wipe the Linux box, reinstall the OS, and put WP back up because the first install was so crazy that I'm not completely sure I can repeat it without wasting a whole bunch of Micah...

My Apprenticeship - Monday, July 26, 2004

Image
This summer I'm revisiting my short apprenticeship at Object Mentor. I'll be posting commentary on all my posts from the summer of 2004 exactly 5 years later to the day. Monday 7-26-04 Word Press is up and running! I had a bunch of ideas when I arrived, but before I got too far I said to my self: 'Self, maybe you outta try starting Apache, MySQL, and run install.php from Mozilla just one more time' Well, I wouldn't be telling ya about it if it hadn't worked. Of course when I say it worked, I mean that the install actually started but not that everything was fine from the get go. First I gave it the path that the wordpress folder was in, but not where the files were. So everything failed, but did so is a way that I could see that every place it was looking was missing a '/wordpress' so I fixed that. Then I tried to look at it on another computer but I was getting a screwed up version of the site. What wordpress really wants when it asks for the location ...

Point Inside a Polygon in Ruby

Recently my team needed to find out if a point was inside a given polygon and, as usual, we found some code on the internet that did what we wanted. And, as usual, there wasn't much explanation as to what it was doing. Here's the code (after we converted it to Ruby): 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 def contains_point? (point) c = false i = -1 j = self .size - 1 while (i += 1 ) < self .size if (( self [i].y <= point.y && point.y < self [j].y) || ( self [j].y <= point.y && point.y < self [i].y)) if (point.x < ( self [j].x - self [i].x) * (point.y - self [i].y) / ( self [j].y - self [i].y) + self [i].x) c = !c end end j = i end return c end end So, you know, it works and I'm grateful to somebody for posting it but we had no idea how it works. So we wrapped 2 tests around it (one where the point is not in the polygon and another where it is...

My Apprenticeship - Thursday, July 22, 2004

This summer I'm revisiting my short apprenticeship at Object Mentor. I'll be posting commentary on all my posts from the summer of 2004 exactly 5 years later to the day. Thursday 7-22-04 Finished up the patterns class today and I have to say that David did a pretty good job. With new material, not much teaching experience, and Paul and I firing questions at him he was able to get through the class rather easily. Sure there were some confusing slides and weird-ball patterns, but the cool thing about OM giving him this week to flesh out the course is that he can make note of the problems and then talk to Micah or Bob to straighten things out. Next week he does it for real with paying customers and I think he'll do fine. I, however, need to write more code. This Word Press/Linux/MySQL/Apache/PHP adventure I've been on has been very informative but sorely lacking in full-on coding. I need to remember to ask Micah (or Bob, or David, or Paul) for some advice on a side project...