Friday, October 28, 2005

Got the player's ship on the screen!

Today, I fixed a pretty stumping problem. You'll never guess how I did it. I read the manual. Can you believe that? I am a male man, and I read the manual! So, I was having a real hard time getting my ship to show up on screen. I thought I had thoroughly examined my example code, but I missed two lines somewhere.

Here's what I had to begin:

//Spin, Shift, Stretch :-)
d3dSprite.Transform = Matrix.RotationZ(visualAngle) *
Matrix.Translation(center) *
Matrix.Scaling(scale,scale,1.0f);

//Draw the sprite
d3dSprite.Draw(tiles.Texture, tilePosition, center,
position, Color.FromArgb(255,255,255,255));



Here's what I needed to have:

//Spin, Shift, Stretch :-)
d3dSprite.Transform = Matrix.RotationZ(visualAngle) *
Matrix.Translation(center) *
Matrix.Scaling(scale,scale,1.0f);

//Tell DirectX we are about to start drawing sprites
d3dSprite.Begin(SpriteFlags.None);

//Draw the sprite
d3dSprite.Draw(tiles.Texture, tilePosition, center,
position, Color.FromArgb(255,255,255,255));

//Tell DirectX we're done.
d3dSprite.End();


Here's what it looks like:

Player ship on screen

Sunday, October 09, 2005

The funniest bloggers I have ever met

So, there's these two people. Between the two of them, they have three blogs. You have got read these.

Oh yeah, I used to be really mad at Brian, but Courtney said to let it go, so I did. Damn, that woman can crack the whip.

Here you go:

http://HollyAndBrian.blogspot.com
http://primatebuddy.tesx.com/
http://neonalune.blogspot.com

Technical Pop Quiz

Alright, here's a pop quiz. And, it has a prize. If you can answer this question correctly, and live in Jax, I will get you an interview for a technical position that requires mad SQL skillz(you should be thinking Napoleon Dynamite right now).

There's a database. It has several tables. I need information from one primary table, a related detail table, and two lookup tables. The linked image below is a diagram of the database.


ERD for the quiz

Write me some stored procedures:

  1. Get all customers
  2. Get all customers whose customer name starts with 'Johnson'
  3. Get all customers whose address contains 'FL'
  4. Return a count of the number of orders per customer. I want the complete list of customers, even if they have zero orders.
  5. Get me all of the details about an order. If there is an id field, return the description from the related table, instead of the ID. I will provide the order ID I am interested in.

Seriously, there is a junior dev position open at my work. They are looking for someone with strong sql skills. This position will eventually grow into a development position. There aren't really any requirements (i.e. college degree); other than being pretty good at SQL.

If you are interested, leave a comment with your stored procs, or link to a text file that contains your stored procs.

Job Digest #2 & 3

Digest 2
The day after I told Steve I was going to have to start looking for another job, he and Chuck came back with a plan to make things better. Now, the dev team is on "Flex Time". We have to be at work from 9 until lunchtime. The rest of the day, we can work or not, as we desire; as long as the work gets done. So, now, I can come home and work from home from 1 until Courtney gets home, then spend time with her and Mik till Mik goes to bed, and then work more if necessary. So, that is basically the most flattering thing(professionally) that has ever happened to me. Plus, it helped everyone else on the team too.

They also pushed back the next conversion by two weeks. That was about more than just me, but the timing made it feel pretty personal. Since then, things have been great at work. Coming home every day is the cat's meow. I get a lot more work done, because I don't have people to chat with, and don't get interrupted every 5 minutes.

Digest 3
There once was a developer named Scott. He didn't know shit. He also sucked as a supervisor, and was the laziest dev I ever met. He was skilled at backpedalling, and looking busy, but not at producing results. This idiot was hired to be my lead, and sucked big fat hairy ass at it.

Scott came to me a few days after I spoke with Steve, and let me know that he was looking for another job, because he hated everything about our product. I can't tell you how much of a jackass he was. It still irritates me(because I'm still trying to fix the crap that he messed up). He was such a bad dev, he introduced more bugs than he fixed.

I did everything I could to help Scott find a job where he would be more happy. I put him in touch with several recruiters. I gave him a couple of job leads. What a helpful guy, right?

Well, finally, last Thursday, he made the announcement I had been yearning for. He quit. And, being the asshat that he is, he quit with no notice. He came in at like 6:30, and was walked out at like 10. Seriously, I grinned until the next day at 5 pm. I still get happy any time I think about never having to work with Asshat again.

I have once again expressed my desire to lead the dev team for this project. I also gave Steve a couple of other options, that he will probably find more agreeable.

Monday, October 03, 2005

Sparkle Timeline Performance

Found this interesting post with the title "Sparkle Timeline Performance" on Tales from the Smart Client.

Read the post, and check out the performance times at the bottom. Going from 12.2 seconds to 4 seconds is GREAT. Going from 8.3 seconds to .379 seconds is REALLY, INCREDIBLY great. That is going from a time span that is going to irritate your users to a time span that most users won't even notice, except perhaps as a flicker of the screen.

I love to read stories where developers stepped back from an issue, and went a new way to tackle the problem, and greatly enhanced their product in the bargain. Good job, Sparkle team.

Thursday, September 22, 2005

Job News Digest #1

Lately, we have had a rather hectic work schedule. I have been working 50-70 hours per week, trying to get our existing clients converted to v5.0 of our application. With a conversion every other week, the whole team has been putting in massive numbers of hours.

Monday, at about 7pm, I called Courtney. She was NOT having a good night with Mikayla. I had also worked Saturday, and worked late Thursday and Friday the week before. I asked Courtney what she wanted me to do, and she told me to start looking for another job.

So, of course, I chose family over job, and agreed. Previously, I had promised my manager Steve that when/if(mostly when) I started looking for a job, I would let him know. So, about an hour after I spoke with Courtney, I told Steve I was going to have to start looking for another job, and why.

Steve asked me if he could have a chance to fix things, rather than me just splitting. I told him I was totally into that, since I don't really want to leave the company, team, or project at this point.

At the risk of sounding cocky and self-important, the team needs me. You see, the same day I talked to Courtney, the execs decided to remove CoreSouth from active involvement in the project. CoreSouth is the consulting company that originally developed 5.0, and had been there all along, working on the project.

So, Steve called the powers-that-be that evening, to see what could be done about my unhappiness. His belief, and I agree, is that the other members of the team are in a similar situation, and may be considering the same course of action.

We'll have to wait and see what happens next, I guess.
Listening to: Song 2 - Blur - The Best of Blur (02:01)

Courtney wanted me to share a story

The last time I was at the grocery store, there was a woman in line in front of me. She was purchasing some items that were unusual (in my opinion). She was getting things like a coffee maker, and other household-type stuff that I would have gone to Target for, rather than Publix.
The cashier was curious and chatty, so she asked the lady if she was just moving to the area. The woman seemed pretty shy, but replied that she had just moved to the area. The cashier asked the lady where she moved from, and the quiet response was 'New Orleans'. Cashier asked if she had been back, or if she lost her home or what. The lady told her that she hadn't been allowed to go back to check on the house, but that her car insurance company had totalled her car. She was living right down the street from me, temporarily.

Well, Courtney and I had already spoken about donating to the Red Cross to help out. We had decided on roughly $100.00 as a donation. When I heard that this woman had just moved from New Orleans(fleeing from the hurricane), I thought it would be much more personal to help this nice, unassuming lady than donate to a huge organization.

When the woman's total for the night came to $103, I decided to do something. She had the cash in her hand to pay with. I interrupted her, and asked if she had just moved from New Orleans, and lost her house. She seemed a little freaked out, but replied that she had. I asked her to let us pay for her groceries.

She was stunned. I told her that we were going to donate to the red cross anyway, so we'd rather help her out. She stammered that I didn't have to do that, and I told her that I really wanted to. She said thank you, and introduced herself. I won't post her name, for two reasons:
  1. I don't think she would appreciate it. She seemed to want to avoid any attention.
  2. I don't remember it. Those of you who know me, know that I suck at remembering names, particularly the first time I meet someone.
I wasn't really going to share this story, since that makes it seem like I was looking for recognition when I helped the nice lady out. That wasn't the point at all. However, the wife wanted me to post the story, so it is posted.
Listening to: Bring It On - Insane Clown Posse - Big Money Hustlas OST (03:55)

Monday, September 12, 2005

Game Update

Ok, I know I haven't posted a game update in a while. It's been challenging lately to work on any personal code projects, so not much has happened for the game. I tried to get the ship showing up on the screen, but was thwarted. I added a bunch of logging to the game, and created a framework for additional logging. The code that is in the game (not much) is incredibly well tested, however. I'll have to look at the book's code more, to get the drawing worked out. I may ditch the book's approach to the drawing, and do my own thing. I'll keep you updated as things change.

Maybe people haven't all changed

I have said many times before in my life that people (all people) must have changed since the 1940's. I read accounts of World War II frequently. Pretty much any piece of material that I can get my hands on. One thing that all accounts agree on is that the young men and women of the United States were lying and cheating to JOIN the fight. The Marines' recruiting slogan at the time was 'First to Fight'. That encouraged recruits to join by the hundreds. Stop and think of that for a moment. The idea of getting into the war SOONER caused hundreds to join the most fearsome fighting force in the world.

Fast forward to my generation, and our war. We have people lying and cheating to get OUT of during their duty. We have reservists' parents fighting to bring their kids home from the battle they signed up to fight.

I have always felt that something is missing in the youth of America, and it is that sense of duty and honor and commitment to an ideal that is higher and stronger than any one person's life.

Today, the fourth anniversary of 9/11, I am watching a documentary that details the actions aboard United Airways flight 93. The documentary includes recordings of the phone calls made by the passengers and crew of the flight to their loved ones at home.

It also includes the phone call which has changed my opinion of the average American. My father includes a quote in his emails. It says 'Are you ready? Let's Roll.' The man that said that then led a charge against the armed terrorists who had taken control of their aircraft. The passengers on that flight had learned that they terrorists planned to use their aircraft as a guided missile.

Those incredibly brave men and women then fought back. They fought back for their families at home, they fought back for freedom. They fought back because they were Americans, and by God, Americans don't sit idly by and watch innocent people be killed. They knew if they didn't do something, then an uncounted number of innocents would be murdered. They fought back for all of us. They fought back for America.

Those amazing men and women struck our first blow in the War on Terror. They have shown that America still has a backbone, and that we will NOT stand for the murder of innocents, and we WILL defend our citizens and our way of life by whatever means necessary, even if that means paying the ultimate sacrifice.

I only wish that there was something I could do to ease the suffering of the loved ones that were left behind. All I can do, however, is make sure that we continue to honor their memory. I will never forget, and I will do all I can to ensure that others remember. The things we forget are the things we are bound to relive.

Thank you for your sacrifice, and for restoring our faith in America, and its people.

Friday, August 19, 2005

This is encouraging

Here is the blog of a woman who took five years away from the tech industry, to be a stay-at-home mom. Now, she has decided to rejoin the ranks of the geekdom. Welcome back, Laurie, and good luck.

Confessions of a Ruby Newbie

Thursday, August 18, 2005

One down, four to go!

Guess what? I got a certification on Monday. I am now a Certified Microsoft Professional, as evidenced by the logo below:



Now, I only have 4 more tests before I am a Microsoft Certified Solutions Developer. That should help my career quite a bit(and gets me a bonus at work, too).

Hospital Trip #1,294,763

Monday night, at 11:30, Courtney woke me up to tell me she was heading to the hospital.  Guess what was wrong with her?  Abdominal pain.  Big surprise, right?  It was pretty bad, again.

She got there around midnight, and got taken back into the ER pretty much right away.  Of course, she didn’t see a doctor until 5:30 in the morning.  6 HOURS of excruciating pain before she got any relief.  What is the fucking point of a fucking hospital if they aren’t going to give you any medicine to help you?

They discharged her around noon on Tuesday.  End result: Abdominal pain, unknown cause.  That is like the FIFTH time we have gotten that diagnosis.  They gave her two days worth of pain medicine, and told her to follow up with her primary doctor.  Who was out of ideas 3 months ago.  So, he’ll just refer her to a GI specialist.  Who she saw two weeks ago.  They’ll want to do some scope work.  Which they did two weeks ago.  Then they’ll probably want to do some kind of non-invasive surgery.  Which they did last week.

And then, next month, we’ll have to take Courtney back to the hospital again, to deal with another abdominal pain, unknown cause.

This is so frustrating, even for me.  And I’m not in pain.  I feel so bad for Courtney.  So, if you see her or talk to her in the next few days, be extra nice to her.  And, if you don’t think you’ll be talking to her, call her.  She can use the extra support.

Tuesday, July 26, 2005

Are IT developers second class?

Joel Spolsky wrote a new article the other day. For those who don't know(probably all of my audience), Joel Spolsky is a hugely successful software developer. He worked on Excel for MS, and is now one of the owners of a startup software company, Fog Creek Software. If Joel didn't have his company in New York, I would be pestering him on a daily basis for a job. Look at what his interns have been working on this year: Fog Creek Copilot.

Most people agree that Joel knows his stuff when it comes to the software development industry. In fact, along with Eric Sink, Joel is one of the people I aspire to be.

This time, though, I think Joel made a few remarks that he is going to regret. I've already seen two articles bashing Joel for his (somewhat insulting and poorly thought out) comments. The article is entitled Hitting the High Notes.

Here are a couple of the quotes that have generated a response:
Is software really about artistic high notes? "Maybe some stuff is," you say, "but I work on accounts receivable user interfaces for the medical waste industry." Fair enough. This is a conversation about software companies, shrinkwrap software, where the company's success or failure is directly a result of the quality of their code.

Sadly, this doesn't really apply in non-product software development. Internal, in-house software is rarely important enough to justify hiring rock stars. Nobody hires Dolly Parton to sing at weddings. That's why the most satisfying careers, if you're a software developer, are at actual software companies, not doing IT for some bank.

Now, for the responses: Scott Reynolds and Phil Haack.

I have to agree with both of them. I have worked as a corporate developer, and while I much prefer working at a software company, my job in an IT department was just as important. One example is the little FTP client I wrote that handled moving critical data from one server to another. The process was originally carried out by hand, and was error-prone. I whipped up a little app that handled the load for us, and we never had another file get missed. Now, our company didn't go under because those files got lost, but we did get a lot of complaints from our employees about the stale data.

Am I any better of a programmer because I now work on software that is sold? To be perfectly honest, although our software is the product that drives revenue, we don't sell it per se. We sell a service, which is only possible because of our enterprise software. The reason we make so much money(70+% market share) is because of the software that we make internally. We have never sold our software to another company or individual. Does that make me a substandard programmer?

Ask the people that know me. I certainly can amaze my family with my applications. Granted, there aren't any commercially viable applications that I have written alone, but they are all of great value to my family and friends. How much more talented do I need to be?

What about the developers at Microsoft who work on their internal products? Are they second class as well? Someone at MS has to work on their current source control system(which they don't sell, and which doesn't even have a publicly available name)? Are they second class? The are arguably as successful as Eric Sink, with Vault, but they don't sell their software.

I think, Joel, that you may need to reword your article a little. It may be harder for you to find that talent in the future, since you are going to be getting at least some of those resumes from IT-type developers who are interested in trying something new.

Wednesday, July 20, 2005

Artwork from the front

Here's what I've been working on for the last couple of days. I don't count this time against my dev total, since it deals with artwork.

I found the ship models online, as well as a space station model. The magenta color will be transparent in the game.

Take a look:

The Player Ship

An Asteroid

An Enemy Ship

Tuesday, July 19, 2005

Artwork

Yesterday, I chose the model that will be used for the ship. I don't remember where I got it from, but the model came with like 20 or 30 different textures. Courtney and I went through them and found the one that we like the best.

I created an animation in my 3d editor that slowly rotates the ship around its axis, and I took screen shots every 10 degrees. So, now I have a collection of 35 different images to use for animation/ship aiming. I may change that, though, to have more images(like a 2 or 3 degree resolution, instead of 10).

As soon as my picture sharing program comes online, I'll upload a full size image, and a game-sized image of the ship, so yous guys can see them.

Saturday, July 16, 2005

Ship, asteroid objects and test framework


Unit Tests

Today, I spent one hour building the player's ship class. I also set up NUnit, and created my first unit test for the object project. The code to apply thrust to the ship works properly now! That was the part of the game that stumped me before; thus the desire to get that done first.

I have also created an asteroid class, which I think is done. I don't think the asteroid is going to have any additional, non-sprite behavior for v1.

Still on schedule, 3 hours down so far.

Thursday, July 14, 2005

Class Framework, the Second


Class Diagram, v2

My research discovered an important and irritating detail of the Microsoft.DirectX.Sprite class. It's a sealed class. Why did MS choose to make this class un-inheritable? I would love to extend the class, and add my update into it. But I can't, because MS marked it sealed. Irritating. So, I'm going to use the SimpleSprite class from the book I'm reading now. I'm probably also going to use the sound manager and texture manager class from the book.

All part of my new approach: don't write everything. Use code that is out there, and available.

Tuesday, July 12, 2005

Class Framework


Class Diagram

Here's the class framework, at least the first pass at it. This took about 25 minutes.

Total time invested so far: ~1 hour.

Hour 1 complete


Screenshot #1

Well, hour one is complete. And it only took 29 minutes! I'm on the way now, baby.

RockCrusher Plan

The Goal
Create a clone of the classic arcade game Asteroids®.

The player controls their ship, which dropped out of hyperspace in the middle of an asteroid field. The object of the game is to destroy as many asteroids as possible, while avoiding collisions.

Complete the game in 80 hours or less. That's 80 hours of work, not 80 consecutive hours. I'd like to have the installer complete by 90 hours, too. My goal is to use WiX for the installer, though, so it should be done at the same time as the game.

The Tools
  • C#, using Visual Studio 2003
  • Freely available art
  • Freely available sound
By using freely available art and sound, I should prevent myself from getting bogged down working on the stuff I am least proficient at, and give myself more of a chance of completing the game.

Nominal Project Plan
  • 1 hour: Get Managed DirectX to display a black screen
  • 2-3 hours: Design the class framework for the game
  • 2 hours: Develop classes for the player ship and the asteroids
  • 1 hour: Display the ship on the screen
  • 1 hour: Display some asteroids
  • 3-4 hours: Design the physics simulation system
  • 1 hour: Apply the physics engine to the ship
  • 1 hour: Apply physics to asteroids
  • 2 hours: Handle player input for the ship(DirectInput)
  • 3 hours: Make the ship wrap when hitting the edge of the screen
  • 1 hour: Make asteroids wrap when on the edge of the screen
  • 2 hours: Add a bullet class
  • 1 hour: Get ship firing bullets
  • 2 hours: Make bullets his asteroids
  • 1 hour: Make asteroids explode when their damage threshold is reached
That's already 28 hours of work.

At this point, I should have a playable game, v0.5

For the next version, 1.0:
  • 2 hours: Add scoring
  • 2-3 hours: Add sound effects
  • 2-4 hours: Add levels
  • 1-2 hours: Make the asteroids break into smaller asteroids when you blow them up(this should be a random choice)
  • 4-5 hours: Add alien spaceships that can shoot back once you reach a certain level
  • 2-3 hours: Give the aliens some AI
  • 1-2 hours: Track a high score board
  • ? hours: Improve artwork
That's another 19 hours, for a total of 37 estimated hours.

For 2.0:
  • 13-15 hours: Add a 3d view, where you can go 'inside' your ship, and see the controls and such as you fight, with a radar screen
    • 2-3 hours: Find/modify 3d models of asteroids and enemy ships
    • 3-5 hours: Convert 2d asteroid & enemy sprites to 3d meshes
    • 2-3 hours: Make 3d overlay for controls/viewscreen/radar screen
    • 2 hours: Create radar
  • 5 hours: Add power-ups in some asteroids
    • 1 hour: Modify asteroid class
    • 2 hours: Create powerup class
    • 2 hours: Modify player class to accept powerups
  • 3 hours: Add bosses to each level
    • 1 hour: Create boss class
    • 2 hours: Modify Level to only progress after destroying boss
  • ? hours: Improve artwork
  • 2 hours: Add a 'Comet' class in to the game
    • The comet will be faster and smaller than the fastest, smallest asteroid
    • Successfully destroying a comet will give you some type of bonus
Going from 1.0 to 2.0 will take an estimated 24 hours.

The total from 0 to 2.0 will be about 61 hours. Seems like my 80 hour estimate is reachable, especially if I break it up into 1 hour chunks.

Hopefully breaking the project up into 1-3 hour chunks will keep me married, too!
Listening to: You Won - Keith Urban - Golden Road (05:21)