24 May 2007
Programmer's notebook, May
(new concept, tryin' it out...)
For RadioWave, I continued cleaning up my messy, messy code. Much of it was carried over from when I was learning JEE and so required a tear-down/rebuild. Along with some JSP refactoring, I began converting code over to the data framework I developed for EventNett. It cleanly abstracts objects into classes for HTTP forms, database ResultSets, and read/write POJOs. They make it easy to copy between the different domains and are far better than my first fumblings in Java (without forcing an more invasive, 3rd party framework on the code). All of this refactoring unfortunately means shakier code in the short term as bugs get worked out but a more stable site in the long term.
I added Classic FM, a station in Australian (recommended by a European listener) which has its own weird time zones, and the music and news feeds from KCRW. Along with this new content, I broke out the detailed listings from shows that list tracks they will be playing but that don't say when they'll be playing them. In RadioWave, these un-timed tracks show up with the same schedule range as their parent show, but with the schedule times light gray instead of white.
I also finally got the Arizona stations in the correct time zone. Although, we'll only know for sure when daylight savings (which they don't follow) hits again.
I moved hosting from my server to LunarPages last month. They have something called an add-on domain that is a very inexpensive way (free, +$2/mo. for JSP) to host a new domain using your existing space. They seem to be down for ~15 minutes every week, but the price is right for JSP hosting.
For EventNett I primarily focused on getting the time zone conversions right--converting the GMT database time to the users' times. That was a bitch and it shouldn't have been. Live and learn. The knowledge will eventually be useful for converting RadioWave's times from GMT.
The only other notable update was fixing the JSP/CSS for the embedded feed (you can see an example here). The CSS had kinda skewed from the main site. Most of the problems were with IE's handing of TABLEs that have their widths specified. If IE can't determine the width of a TABLE's parent DIV, it will use the page width. Nice. The solution--as I now know and will cherish--is to create a DIV between the TABLE and its parent and specify a width of 100% in its CSS (not in its width attribute).
Finally, work (isn't it always the least interesting?). I had been struggling with getting the data sent from an existing utility to be received properly by a servlet I had written. The utility had been in the field for years with no issues (AFAIK), but when it sent data to my servlet--via HTTPS PUT--every other message was garbled. Unencrypted data came across fine, but SSL failed. What to do?
After getting schooled in the use of Wireshark from a co-worker, we poked and prodded with the packets for a few days, trying to learn what SSL should look like. I first wrote a Java utility to make the same calls, but it didn't reproduce the mangled packets. Finally, I wrote a C++ utility, mimicking the Win32 calls that the actual application was using. Testing with that, I found that the problem occurred only if data was sent from a Win2000 machine. I did some googling and found that the Win32 calls weren't being passed the correct flags; still waiting on verification though. Man, I hope that fixes it, 'cause I'm all out of ideas.
- Techniques after using Swift for a month posted by sstrader on 26 August 2015 at 11:41:51 PM
- Some thoughts on Ruby after finishing a week (minus one day) of training posted by sstrader on 15 December 2011 at 8:59:30 PM
- Links on the singleton pattern posted by sstrader on 9 December 2011 at 9:19:50 AM
- Phonebot posted by sstrader on 29 October 2011 at 6:37:05 PM
- The labeled break in Java posted by sstrader on 4 September 2011 at 11:27:56 AM