Showing posts with label rant. Show all posts
Showing posts with label rant. Show all posts

Tuesday, March 07, 2017

Why I Hate/Love Free Support - I'm looking at you Piwik!

Who doesn't like free? Of course as the age old adage goes, you get what you pay for and Piwik is no different. Piwik is an analytical platform for log analysis and real time (semi) user tracking via web service calls. All in all the product is decent. We are running a local version of their software and performing log analysis only.

We (meaning me) ran into problems during a few different stages of implementation. I posted 3 different times to their forum with only crickets as a response. One topic was viewed 138 times and the others around 50ish. Not a lot, but hey someone's looking. There weren't even any responses from that one jerk who says, "I have no idea, man" or the other jerk that says "just RTFM" or the jerk that says "I'm not going to do your schoolwork for you" or the last jerk that is obviously from the java forums who says "if you are too stupid to figure it out I can't help you" (you know who you are!). 

There is one guy, Matthieu Aubry (the creator of Piwik) who does make great efforts to answer questions, but he appears to be just one guy (or ARE YOU?!?!?!). I do not fault him in any way and as a developer who also supports users I understand the lack of time he has to do both.

Piwik does have paid support contracts that will solve the world's problems, but it is rather expensive. For the little guy you are SOL. Piwik has a stackoverflow section, but that too is sparsely answered. In the end, I spent way too many hours troubleshooting and trying to figure things out, but hey you get what you pay for.

Sunday, March 30, 2008

Things I Hate About JAVA

It's ranting time and I am officially enclosing this whole blog in a big fat rant tag:

<rant>

First off I'm not an über java programmer so coming from other languages I've picked up a thing or two about how I would expect languages to be programmed based on convenience and consistency. I'll keep this short and only hit my major gripes:

Why Java is EVIL:
  1. Bad plugin implementation - how many times has an applet crashed your browser or not work cross platform? Granted it has come a long way and it really depends on who programmed the applet, but in general you have to blame SUN for poor implementation. They should have fixed it way back in 1.0. If they did flash most likely would never have hit the market. Now I find client perception in Java to be slower than Flash (especially AS3).
  2. Programmatic Inconsistencies - why is it that to get a length of a string you use: string.length() and for an array: array.length; and for a vector: vector.size(). Who programmed this crappy language? Yes I understand that a string is an object and that length is a property of that object, but why not make a function? I understand the concepts however backwards they are.

    I have an idea: how about using a method for everything and calling it .length() ? Just make all arrays have a default method called length(). Same with vectors (why oh why did they choose size() ). Remember if you want people to pick up your language, make it easy for them to do so.
  3. Java Docs - OHHHH how evil these are. They are god awful in design and usage. Their initial examples suck (if they even have any). Why not have an example for everything in there (method specifically). If you have a method called length() give me an example. I don't care how simple, just an example. Don't make me search the web to find an example when you could easily make one. Remember if you want people to pick up your language, make it easy for them to do so.
  4. Last but not least I HATE - I repeat HATE "Null pointer exception" . I give this one big WTF Sun. Yes I get the premise behind it - I am using a variable that hasn't been initialized or something else along those lines. Don't just tell me "haha sucks for you, you have a null pointer exception" TELL me where it is. Where am I calling it, what is the name of the variable/object etc that is null? Lets take a look at a JSP example (since I happen to be working on this now):
    [31/Mar/2008:08:29:15] failure (15460): Internal error: servlet service function had thrown ServletException (uri=/cp/www/registration.jsp):$
    at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:453)
    at _jsps._www._registration_jsp._jspService(_registration_jsp.java:826)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:259)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.access$6(JspServlet.java:249)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:530)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:599)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:943)
    at com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1094)
    at com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunner.java:1005)
    , root cause: java.lang.NullPointerException
    at _jsps._www._registration_jsp._jspService(_registration_jsp.java:620)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:259)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.access$6(JspServlet.java:249)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:530)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:599)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:943)
    at com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1094)
    at com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunner.java:1005)


    Where is the line number in the JSP? What variable? What object? Throw me a bone here Sun! Now I have to use System.out.println to track down the freaking line that it is on. Yes I know you can go to the java file that is precompiled and try to find it in there. That sometimes works, however System.out.println 's are often just as fast.

    ALSO - I give kudos to Macrobe for making ColdFusion user friendly. ColdFusion is built on top of a Java runtime and when an error is throwing in CF it (usually) tells you the line number/variable etc etc. Good Job guys! I imagine your programmers went through hell to get that working.
Java how I hate thee...

</rant>

Thursday, February 15, 2007

Cairngorm, good to the last drop, or just a drop in the bucket of other frameworks

Well tonight I, along with my comrade in arms Brian, braved the wintery weather of NYC to go to a Flex conference hosted by the New York Flex User Group. This was my first visit to the group and I am fairly new to flex so I thought that this would be a great opportunity to see what others are really doing with flex. Tonight's topic: Moving to Cairngorm, by Michal Glowacki. Right off the bat you can easily tell that Michal is quite intelligent. He was one of the cofounders of the Cairngorm framework (which was eventually bought out by Macrobe and is still in use today by Adobe).

Basically this framework works as a means of standardizing the location of code when developing projects. With this framework he breaks it up into three layers: View, Control and business logic (I know this is not what he said, I'll have to fix this later, but this is the essence of it). In short you put all your display code in one folder, the handling of 'gestures' (button clicks, mouse movements etc) in another, and any other business logic in a third. The really good part about this framework is that if you have multiple developers working on a flex project, they can all work on separate pieces without stepping on each other's toes. However, if you are a single developer or your application is very small, this is basically overkill. Michal opened by saying that if you include all of the Cairngorm libraries, your movie size will be 300k+ larger - yikes. Perhaps he meant source code size, but it wasn't clear. I know you can just import the libraries you need so that problem is out the window.

I won't delve too much into the actual presentation, but just a note for any future developer/presenters, not only does PowerPoint kill, but if you code an application from scratch in front of an audience, yes it is quite a feat, however it is boring as hell to watch. Just show the audience the end product and explain each piece, or save a few lines for the audience and then wow them with the result, or show a completed product and ask the audience for suggestions on what to build into it.

So overall here is a quick breakdown of Cairngorm:
  • Great for multiple developers
  • Crappy for single developer shops, or very small applications
  • Don't bother retro fitting existing applications (Michal basically dodged a question as to whether it was worth rewriting existing applications)
  • New applications or potentially complicated applications can benefit from a standardized framework of code - not necessarily Cairngorm, just a standard framework

[rant]NOW for the rant of the day - DO NOT come out with a radically different framework when going from version 2.0 to 2.1. That is just stupid. What good is a standardizing framework if it keeps changing??? UGGG - I won't be using this framework until version 20, or whenever they decide to make it consistant.[/rant].

OK any advocators of Cairngorm who wish to turn me around feel free to post. I just don't see it - maybe I'm just a flex neophyte, or maybe it was the cold weather (and stepping in a very cold puddle), but I just don't see it yet...

Want to play with Cairngorm:

Thursday, January 11, 2007

Windows XPSP2 and SQL Server 2000 - Evil?

<rant>XP SP2 IS EVIL - read more to find out why<rant>

I knew there was a reason why I held off on upgrading to SP2 on XP. I know sp2 has been out for many months, but I knew that it was evil when I first upgraded my home machine months ago and it fried it (BSOD - had to do full reinstall). So naturally I was apprehensive when it came time to upgrade a desktop at work (we are being forced to upgrade our machines to sp2). Well I figured that I would run the installer myself so I could tell right away what breaks. Running the installer went ok and after several reboots I killed the windows firewall and restarted my ZoneAlarm and then started SQL Server 2k and CF 7. Suprisingly all started fine. However when you try to connect to a datasource defined in the CF admin, I kept getting an error about not being able to connect. Within my CF admin, I was connecting to 127.0.0.1 on port 1433 as a normal sane person would.

Ok so after bashing my head against the wall and trying all of the "fixes" by microsoft which all regard adding ports to the windows firewall (which is disabled I remind you) I took a stab in the dark. I added datasources to the ODBC control panel in the System tab since that can connect to (local) and CF can connect to it via ODBC connectors. One more note, I still can't connect to my server via 127.0.0.1, rather I have to use (local). Now inside the CF admin I connect via ODBC and everything is fine. This is one more annoyance that Microsoft has given me. GRRRRR.

If anyone has a solution to this I would greatly appreciate it.

Sunday, January 07, 2007

SQL Server 2000 Massive Transaction Log Fix

Ahhh the sweet smell of a full hard drive - isn't wonderful, NOT (think Borat). Ok so today I was checking out a computer running SQL Server 2000 when I noticed that an application was throwing errors that the disk was full.

I took a look and sure enough it was! I knew this box was getting low on space for a while, but I ignored it (not a production box, just a test). I tried to clean up space the usual windows way, run the low disk space cleanerupper. Then I went through and looked for logs in various applications and wiped them, but this was not enough.

Then I did what is one of the more clever things to happen to the windows search - a search based on file size. It has been in windows since at least 2k, but I'm pretty sure it was there in 98. I looked for files greater than 100mb and sure enough an 8GB file popped up at the top. What was it? well my SQL Server 2k transaction log (.LDF) for a database that has fairly high traffic. Since this is a transaction log in general you don't want to just wipe them. I did a couple google searches (<rant>btw Microsoft's MSDN site sucks for SQL server - at least in this instance. They had a dozen articles on shrinking the db, but not one that actually showed a command to do it. Anyone can talk about theory, but just a simple example would be nice.</rant>).

Ok well now it has been about a half hour and I came across:

This was perfect (and at least 2 pages in on my google search). From the page:
In SQL Server 2000 Query Analyzer run the following command (doesn't matter what db you are in):
backup log [database name] with truncate_only
(don't include the square brackets)

Open Enterprise Manager and navigate to your database:
--Right click on the database
--Highlight 'All Tasks'
--Choose 'Shrink Database...'
--On the bottom of the window on the right, click the 'Files' button
--In the drop down at the top make sure you choose the '_Log' option. By default it is the '_Data' option
--Leave the shrink action as: 'Compress......'
--Click 'OK'

At this point depending on the size of the file, it may take a minute or two or more and then it will give a success message. I took a look at my LDF file again and it went from 8gb to ~2mb.

Success!! Now rejoice by clicking the play button below (this is in my head every time I do something successfully)!

Monday, December 11, 2006

MythTV - just a myth or a reality for the Linux neophyte

<rant>Rant #1 - I have to start this off with 'WHY ME, WHY ME, OH THE HUMANITY!' Why you ask - well barring the fact that this is now 2:30 am, I have been attempting to get MythTV running on my CentOS Linux box for the past 4 hours. I have to hand it to Microsoft and Windows application developers, at least when they need a dependency they either include it or provide a direct link to it (well most of the time). My limited experience with Linux makes me the perfect candidate for RTFM, however who needs a manual??? Ok well I do, but it doesn't help - provide examples that anyone can understand, not just Linux guru's!</rant>

<rant>Rant #2 - BestBuy you kinda suck. I went to BB yesterday (Saturday) to pick up an ATI TVWonder 650 card for like $130. I got it with no probs, then the next day I look at the circular and what do I see - the card for $99! However, I had a bad feeling last night so I never opened the box. I was reading some posts about people having Windows/Linux driver problems and various problems all around so I elected not to open it and go with my original plan - the Hauppauge WinTV-PVR-150. Normally it retails for about $100, however CompUSA had a special this week (Dec 10, 2006) for $40 after rebate!!! Joy! I picked one up and returned the ATI and I'm super (thanks for asking). BB, you should have had some means of telling me that the product would be on sale the next day (hmm if only BB had a computer, or a room full of Monkeys to input the sales for the next week and then compare items when purchased...) - Boooo</rant>

Ok now that that is out of the way lets dig into what happened these past for hours. First off I have to give EXTREME thanks to a guy called Jarod C. Wilson. He wrote this great tutorial on how to set up MythTV on Fedora.

While it got me about 70% of the way there, there was another person - 22Eleven who created a tutorial for the CentOS specifics

Ok a tutorial can only take you so far with Linux. In a perfect world (not that I'm calling Windows the perfect world) you could just run the installer and boom it would be done. Well when I installed CentOS, I chose some extended options like GIMP so I could potentially do some photo editing. Well MythTV installer wants nothing to do with GIMP or any other photo type programs. So during my installation of MythTV as per:
> yum -y install mythtv-suite

I received many errors like the following:
Missing Dependency: libstdc++.so.6(GLIBCXX_3.4.6)
Missing Dependency: perl(File::Slurp) is needed by package perl-XMLTV

Well I'm not a Linux master, but wouldn't you think that you could just install libstdc++ with a yum command? NOPE forgetaboutit! So then I had to uninstall them with commands like:
> yum erase gimp

After uninstalling anything that was in the "is needed by" list, I tried again - no good, other probs still. I ended up going into 22Eleven's tutorial again and looking at the YUM configuration again. I noticed that I had mixed some of the YUM configs from Jarod's and 22Eleven's. I wiped out the unnecessary configs and tried again - no luck. Then I went in and enabled the "atrpms-testing" and tried again. This time still no luck. Ok I was about to throw in the towel and then with dumb luck I tried installing it with the following command:
> yum -y install mythtv

Notice no "-suite" on the end. Well to my suprise it worked!!! It installed with no errors (at this time it is about 1am). Well now I'm on a roll so I figured what the heck - lets try for the home run and I ran the yum command with the -suite and it too worked properly with no errors!!! My assumption is that by installing MythTV standalone first it fixed some dependency issues.

Well now this is freaking sweet so I just followed along "10. Get and install capture card driver(s)" within Jarod's tutorial and I didn't hit any hiccups since. I was able to query my card and the picture looked like crap, but I had faith that it was just using some baseline driver for looking for video. After the tv tuner card was set up, I walked through setting up MySQL with no problems either. Then came the setup for MythTV. That too had no problems. It brought me into a wizard which walked me through its initial setup. My only problem was that my mouse had no cursor in their setup wizard so I had to either use the keyboard or eyeball when the mouse was over a field by looking for the box to lightup.

I realized the first time through the setup that I didn't have the channel guide. Upon RTFM'ing I realized I had to create a Zap2It account in order to retrieve the channel listings. After creating it with no problems, it reminds you that you have 3 months of free usage, then you have to come back to the site and take a survey before it will let you use it again. A small price to pay for something free like this.

Finally I made it through the setup and finalized the download/processing of the channel guide (which btw took about 10 minutes to grab 2 weeks worth of channel data). Now comes the juicy part - using the program! I ran:
> mythbackend

to start the service - then I ran:
> mythfrontend

to run the actual application. I immediately went in and tried the tv and........... IT WORKED!! The quality was a little off, but that could have been because of a number of reasons:

  • Old cabling

  • Old cable splitter

  • Bad signal coming in (not likely since the tv looks fine

  • Computer is too slow - could be since it is only a 700mhz, 512mb ram, 16mb Voodoo 3 3000 vid card

  • Computers don't like me


Well I would love to stay up and tinker some more, but I have to get some sleep before work starts in a few hours. Tuesday or Wednesday I'll get more time to tinker again.

Wednesday, November 15, 2006

Traffic Rant and Introducing kHTTP!

Well it has been a few days since I last posted and I first want to start off with a little non technical rant about NY/NJ roadways. PEOPLE NEED TO LEARN HOW TO DRIVE IN THE RAIN!!!

Ok enough said about that, on to bigger and better things!!! A while ago I was learning some VB using Visual Studio .NET (btw an excellent IDE imo - one of my favorite features is the tag insight which includes your own custom functions). I wanted to learn more about how to develop a command line application for doing HTTP calls. This originally came about because of my work at Hofstra University. We use this job scheduling software called AppWorx which unfortunately can't make a simple HTTP request, but can execute any other program under the sun. Well I figured - how hard could this be to write a command line program that will make a request to get a page. Turns out it wasn't that bad in VB. Click the link below to download my program khttp.exe (win only). Type khttp.exe -help for usage. This little program will return information like the headers/page content/date modified etc. For a quick demo try:

khttp.exe -a "http://www.google.com"


Let me know what you think, and if you do happen to like it or use it somewhere drop me a message I would be very interested in hearing how it is used.

Click here to download khttp.zip

(the usual rules about downloading strange applications applies - always check for viruses - if this blows up your machine it is not my fault - blah blah).