Saturday, December 15, 2007

More Than Meets the Eye

I invested money this Christmas for my nephews, but it doesn't do much for the excitement factor when there's nothing to open up under the tree. They're in love with Transformers as many children this year are and in light of that, I went looking for a Transformers toy. Being in a small town with no branded chain store other than the dollar-type, this morning I shopped online for some ideas. My natural choice was amazon, which has never given me any trouble. I found the Bumblebee transformer which turned out to be the same size Transformer I played with in the 80's. The price? $44.98.
The reviews say that it's actually priced around $10 at brick-and-mortar stores (probably $5 20 years ago), and this place is ripping people off. It's a third party seller, named "Waityn4JC" (is price gouging Christ-like?) and apparently the Amazon marketplace sellers are not held to any kind of ethics codes. In my humble opinion, Amazon should really stay away from allowing people to do this, but hey - it's America. They'll do their part to make a quick undeserved several-hundred-percent markup, and I'll do my part to find something else that doesn't feel so much like rape. I love this country.

Marketing Director

Hello World,

Since the success with our first customer, I have decided to expand my empire and hire* someone to make Rehberg Technology known throughout the South*. I'll need a special person (preferably local) to buy this shirt and wear it for a solid month, outside, during daylight hours. The qualified applicant will also be encouraged to show people how to buy their own shirt of my design. The shirt truly shows what I feel and is an illustration of, well, what popped into my head this morning. Now go shop, or apply* for the position.




Interested parties should e-mail a resume and cover letter with Marketing Director in the subject line to inquire@rehbergtech.com. Individual will be paid solely on commission.



* not really.

Update: Due to the price on the shirt mentioned above, I have discontinued it. Looks like I posted too early. Hell, I can't even get the shop activated for some reason (my impatience might be the problem). Would someone let me know when they see any products in the store? Thanks.

Tuesday, December 11, 2007

This is a test post.

This is a test post. I am sending this text from my phone via e-mail to a special address at blogger.

Did it work?

Update (from a computer): I am limited to a 160-character message from that phone. Not too fantastic for blogging. But it did work, and I have a new way of blogging to the world from an underground imprisonment (if that were to ever happen). Good to know.

Monday, December 10, 2007

More Java Fun

The TV-as-monitor fad went out this week. I really just need that machine to do more than I make it do, so I'm getting ready to throw XP Pro on it and replace my current desktop.

Besides, I couldn't read the screen from the bed anyway.

School has been interesting and I'm sure you'd like to read all about it, so:

Java is a little less intuitive than the .NET platform. Programming things like default actions and which element gains focus is a little harder in Java. In fact, I haven't figured it out. This weekend I had to write a program that accepted a list of names while ignoring duplicates, then allowed the user to search for a name in that list. Easy, right?

The flow of the program was easy: Accept a name or a list of names, put them in a list, then turn around and allow the user to search for a name in the list. The project was to have us use the LinkedList data structure and its methods. Very easy in design, but I got hung up on something so simple as sending the signal when the user was done typing names. I couldn't do this simple little procedural program, so I decided to do a full-fledged desktop application.

It's called (for lack of a better name) Name Reader.



Way easier to manage the input with an event-driven model rather than a command-line-based procedural program. The user puts a name in and presses the "Add" button, and voila!



When the list is big enough (or whatever), they can search for a name from the search box:



If the name is in the list, it will say so and give a position number. If not, it will also say so, but give a button with the option to add that name to the list.



Genius, huh?

Actually, I don' t think so either. I wish I could come up with something really grand so I can join the club of cool programmers. I have all the books; I just need that pinnacle of expertise that says "I have arrived!"

Anyway, here's the project file (NetBeans) if you want to look at it and improve upon it.

Monday, December 03, 2007

Horizontal Thoughts

I'm writing tonight to see how much I can think to tell my audience as I lay in bed with a wireless keyboard and gyroscopic mouse, staring at my beautiful TV/monitor. Looks like I got it all worked out, but I can barely read the screen from across the room and there's a significant delay between the keystroke and the appearance of the letter on-screen.
I'm really just up late because I can't figure out Java multithreading (or multithreading in general) enough to complete a project for school due Monday at midnight CST. So if anyone knows how to write a multithreaded chat server in Java, please contact me soon. I have several questions for you, including these:

1. How can more than one client connect on the same port number?
Never mind. I just figured that one out. The server can listen on a port and has exclusive rights to that port. The number of connections on that port matters only to the program listening.

2. How do I create a thread pool with an ArrayList and then pass a Runnable object to it? I don't see a method to pass the object after instantiation.
Update: I got that one figured out, too. You don't pass a Runnable object - just extend the Thread class and fill your ArrayList with those. Worked for me. To stop the thread, set it to null. To start it again, pass it what it needs and then call .start().

If you want to see that code, here is the Client, the Server, and the ServerThread. It's not pretty and there are some errors when you close a Client, but the multithreading works.

I realize these are not questions for my typical audience, but hey - what else should I do in bed at this hour?

Sunday, December 02, 2007

Insert Title Here

These new LCD televisions are pretty neat. I finally broke down and bought one a couple of months ago and the idea just hit me this weekend to put a computer behind it. I have just the machine.
I've had a Dell PowerEdge SC440 on my desk with no monitor for several months. It's an overpowered, underused machine, so I gave it a DVD+R drive and set it behind the new television in the bedroom. The audio already goes out through a PC speaker set, so why shouldn't I complete the package?
So now I have a blazing-fast Fedora Core 7 box with a 32" widescreen monitor, right in my bedroom. I'm still working on the wireless keyboard and mouse part, but so far it's fun. I've been ripping DVDs with HandBrake and looking for ways to have this machine become a media center of sorts.
The one thing I enjoyed about this project was the wireless Ethernet bridge I installed in under 10 minutes. I used the Linksys WRT54GL employing dd-wrt to create a network link without running a single wire. As a bonus, I can now connect the Xbox to the Internet (but I still have no need to).
In the near future, we'll upgrade to Fedora Core 8 (released last month) and see what there is to see. Until then, try to find something you like to do in your own bedroom.