Tag Archive: Java


OfficeDesk-smTime at the desk has been limited this week. The extreme cold has listed Pittsburgh as one of the 20 coldest cities hit by the arctic polar vortex. As a result, My 7 yr old has been out of school both Tuesday and Wednesday and my over/under guess is that he will also be out on Thursday. We are due for another sub-zero with windchill morning. My time in the office has been limited. I have however, had time to finish doing some cleaning to my work desk. I’ve been trying to do a full clean and organise over the past month due to the fact that this is now my 24/7 work place. (If only I were getting paid)

But onto the progress. Software design is often an experience of two steps forwards one step back. Sadly, the one step back also usually consists of several O’Reilly manuals, a bunch of gSearchs, and of course documentation and answers found on StackOverflow. Today was no exception. Finally back on my desktop app for entering data I realised that I wasn’t just doing SQL puts to the database. I was also uploading graphic resources. These however were going into a directory with references being added to the database. Sigh, back down to the API level.

So today, I had to learn in Java (and to some extent on the Client level) how to compose programmatically an upload post and then correctly save it to my server. Now, I (as always) realise that there are probably simple libraries to do this and experienced Java, JSP, and LAMP folks will scoff at the likely banal process this is. I however hadn’t done it before so I had to teach myself. Happily, info was available in the form of a few StackOverflow questions, a couple of nice online tutorials, and a few hours later; my Poster test app is sending the requisite info and it’s causing a file to be saved. This isn’t finished. I haven’t actually put in some of the path and file directives and I’m not sure that the file is storing up in clean shape. But considering the fact that I have only gotten about an hour at the desk today; and that before that hour I didn’t know how to do this at all; I’m kind of happy about the results so far.

Tomorrow, I hope to have more time at the desk (even though the child is home again) and I hope to finally be done on the API level… for a while. Also, I will be having a conference with one of my “volunteers for credit counting.” What this means is that they’ve agreed to volunteer time in exchange for tracking hours and converting it to value once we see more funding. I’m incredibly excited to have this person working on the team because they have great business depth, incredible sense of organization, and a great working relationship with me to call me on stupidity when needed without taking a response of NO personally.

Things trudge, but I think we’re on track to keep moving forwards.

As always, if people are interested on helping out.. I’ve got plenty of work to go around.

I don’t get nearly that much done on the weekend with The Project. Sadly my back went out today so I found myself enjoying the comfort of my home office chair.

I managed to finish up the last of my API calls that allow me to start crawling back up the stack. As a reminder, I started on the end client with hard coded data. Then I went down and created an SQL based relational database to hold the data. Then I realised I needed an app to enter data. Then I realised I needed an API for the Apps to use.

So, thus began my love-hate relationship with Java and Tomcat. Both of which I knew next to nothing about.

Fast forward about 3 weeks.

The first version of the APIs are done. However, in checking the logs for the Tomcat server, I discovered some sites had been snooping around. I had hits from Wichita  Kansas, Brooklyn NY, and several hits from places in China. Needless to say, this made me just a little cranky.

So today, I got up close and personal with two technologies. Tomcat Addr Valves (which is like a Tomcat Firewall) and VPN. After a bunch of minor testing, I can say with (unlearned and naive) assurance; the net-facing service is now accessible by VPN only.

I wish I had more of a choice here; but I don’t. Until I’m ready to open the floodgates, I need to have access for people helping me who aren’t on my internal network while still having the resource accessible remotely. This seems to be the best approach.

Where does this put me? On Monday the first thing I do is gut the old client’s APIs in favor of the new ones. Then I start fixing up the data entry program. Then I start entering about two month of newer data.

Then we can start pushing on that client full speed again. Whee!

chattering-teethThis weak (sic) has been full of excitement. Thanks to the surgery which left me doped pretty much all week, I’ve gotten far less done than I wanted to. This is right down to having to push off an appointment from Friday to Monday as well as completely missing important mail from my land lady. There have been some highlights however.

  1. While I’m likely not using them correctly, I’m navigating Tomcat, Java, and Eclipse more efficiently now.
  2. I’ve done my first servlet code to push data back to the database from a client
  3. I’ve been working on a data entry app to make adding data easier. (It’s crappy, but it has some nice features including db lookup)
  4. I may have a potential Product Manager to start working with arranging the business end of thing.

On the agenda (aside from catching up on email and meetings)

  1. Data Entry Client
    1. Add versioning info to the client 02104.01.12..2250
    2. Add the data client to the continuous automation 02104.01.12..2250
    3. Gather the collected data for push back to the server
    4. Add a <strike>redacted</strike> to let me see where a <strike>redacted</strike> is.
  2. Servlet
    1. Finish the data PUT calls for posting data to the DB
    2. Learn how to automate the checkin of java code with CI to push it directly to the Tomcat machine.
  3. Client
    1. Use the new data managed in the DB to populate the existing interfaces
    2. Disable unused interfaces for Alpha distribution (keeping active for dev dist)

As you can see, the week ahead is fairly full code wise.

Time and code marches on!

hurdleA happy new year to all! May we all join in peace with the shared knowledge that for the next month we shall all be writing “20134″

The reason I put “Vacation” in quotes like that, is that when you are the sole coder on a project of your own devising for your own release for your own product for your own (intended) revenue. The only think that delays said revenue is said sole coder. So you find yourself working even when you say you won’t.

This week was predominantly learning Java and Servlets. I would be a fool to say that I’ve learnt it all. But, I seem to now have enough under my belt that I am successfully using Eclipse, making a minimal number of Syntax Errors per revision, pushing the class to the Tomcat server, and seeing the fruits of my work.

And what are said fruits?

Originally my client was pulling data from a JSON file that I belched out from a program that made the data than I entered by hand. This JSON file was a static resource that had to be kept up and verified with each data modification. This was a painful process.

Google-r Bruno Oliveira puts this very well: (click for a larger version)geeks-vs-nongeeks-repetitive-tasks

 

When left to our own devices, we will try to simplify long and annoying process. We may do so through some even more annoying process, but the payoff is ginourmous.

Last week I had a monolithic JSON file with every bit of data in one place. This week, I now have a MySQL database with the data broken into different tables and a Tomcat Servlet, making the necessary calls to create only enough JSON data  populate the view on the client. This is reduce some major overhead and going forwards will allow far better expandability, data management, and communications scaling.

Ain’t net tech awesome in the 2010s? This is so much better than trying to compress user level data into a few bits in a byte because you only had 400K to store your data and your BBS.

Important Java tip:

In a try-catch-finally block, finally is always called.

Do not assume that you are in finally because your try threw an exception. Cleaning up resources that you built in try during finally will really make your program fail.