Eclipse Wants a Stable JRE…So It Fails

June 1st, 2009

Writing Code…

A while ago, I got used to and learned to like Eclipse Ganymede very well. It worked wonderfully. I’ve been using it for Java development ever since. I took on a project involving designing a game, one I had been hosting on Google Code because I’m all-Google and because it would make it easy to share with others and transition between workstations. A flash drive with eclipse, subclipse, and my SVN settings with password on it made it even easier, especially for the locked down ones I sometimes use. I had eclipse installed to the hard drive of my netbook, and launched it a couple days ago to fix an annoying code issue. It fails to launch. I try again. Fail. I look at the stack trace. It seems to suggest it needs JRE 1.5.xx? Wait, don’t I already…No!

Why It Happened

EDIT (6/3/2009): I had corrupted the install which was the real reason. An uninstall and reinstall worked fine.

I was using Chrome, my favorite browser, to view some pages when one of them turned out to require Java. I click the handy Install Plugin… button at the top. Fails because of lack of admin privileges. Makes sense, I try to make my regular users not admins. I download manually and proceed with install under “Run As…” It works! Finally! And then, it launches another install. Boom. Fail. The second part didn’t have my privileges. Boo hoo, it was some junk anyways. Reboot, Java works in Chrome and I can finally do what I needed. Eclipse doesn’t. I don’t think it was the mid-way fail that caused it, though. I think it’s because in order for it to work with Chrome it needs to install JRE 1.6 beta. Ganymede decides it doesn’t like beta. Ganymede die.

Urg

I spend over an hour looking for a JRE 1.5 revert download. Nothing…Nothing…Ooh, an uninstall script! Doesn’t work for 1.6.3, only 1.6.0 - 1.6.2. Wow. I can’t even get 1.5 from Sun or anyone else! They all want to give me 1.6 or tell me to shoo because I don’t know what I want. Too bad for them.

I’m stuck. I’m stuck with Java 1.6. Without a way to make code changes on this computer any more.

Morals of the story:

  • Sun should let me think for myself
  • Eclipse should permit running under 1.6
  • Software downgrades should be lightly buried, not hidden in the earth’s core
  • People should answer their phones and stop calling me back so I don’t have to put their voicemail on call waiting
  • I should think before installing a beta JRE
  • I should finish the part of the game permitting others in my group to write the levels for me! That way I only need concentrate on gravity, collisions, loading, sound, the real fundamentals. They go be the expressive creative ones. Not me. I stink at that.

Google Docs as a Free and Easy CMS

May 18th, 2009

CMS

A CMS is a content management system. Basically, it holds all the revisions, deals with collaborators, and puts stuff into templates so it’s nice on the eye. Good CMS’s will allow you to edit WYSIWYG too. It is, however, a pain for me to go to the work of setting up Joomla, Pligg, or WordPress for something quick and simple. And I hate to pay for software. What do you do when nothing fits just right? Invent your own system.

Google Documents

When you think of the things a CMS can do, Google Docs immediately comes to mind. Revisions, collaboration, WYSIWYG editing, and even basic publishing. The “publishing” feature only give a black and white page with not much wiggle room to turn it into a real site, although. Then I had my idea. What if PHP was to grab the published document’s URL and extricate the content, and then echo it back as if the content was hard-coded in? Some thinking, a soda, and ten lines of PHP, it was done. The script retrieves the page and discards anything before the content and everything after it. This however, removes some of the styles Google Docs puts in. If you edit the raw html of the document as Google kindly allows, you can add tags that you can refer to in your own linked stylesheet. The Google Doc must be published to work.The script is as follows, and if free to use with the comments in place:

< ?php
$docID = "dfgpnkdc_37fn6v5tfh";
//published google docID (part of publish url)
$temp = file_get_contents("http://docs.google.com/View?docID=" . $docID);
//get the page contents of the "preview" url for the doc
$temp2 = explode('<div id="doc-contents">', $temp);
//separate into the upper non-text half and lower half
$temp3 = $temp2[1];
//discard upper half
$temp4 = explode(’<br clear=”all”/>’, $temp3);
//separate into all-text and non-text, again  

//don't remove this line:
echo "<!-- Google Docs CMS PHP script copyright 2009 theajblog.com, begin script generated text -->";

echo iconv ( "utf-8" , "ISO-8859-1//TRANSLIT" , $temp4[0] );
/* echo text converted utf-8 to iso-8859-1 - important. Apostrophes turn into A’s with tildes because of a character mismatch otherwise. Also, without //TRANSLIT, certain characters like a special closing quote will cause it to cut off the document there. */
?>

iPod Touch Jailbreak + YouTube Fix

May 7th, 2009

I’m Back - Sort Of…

I’ve been very busy with other preoccupying tasks in my life. This post is only to help you with any iTouch YouTube issues and to help you not waste hours into early dawn searching through 3-year old dead links from dying forums. I am not technically “back.” Oh, and keep in mind I’m tired because it’s kinda late (in my time zone, not the blog’s) and my writing won’t be top notch. Finally, check out winintosh.com, a friend’s website who I helped get up and running and am basically a co-founder. More on that later?

Jailbreak

You’ve heard of it and maybe wanted to do it. For those that don’t know, it will also break YouTube with the error that it can’t connect. I searched the Internet and did some other things in an effort to fix it, which I describe below:

Attempt 1

I ssh’d into the Touch and overwrote some files with some functioning iPhone firmware. Oops! Plugged into iTunes, refuses to sync (and thinks it is now a bricked iPhone). Restored the overwritten files and on to next attempt.

Attempt 2

I ssh’d into the Touch and renamed Lockdown to Lockdownblah. Then I mozied around and tried YouTube, which didn’t work. Restarted and tried final attempt.

Attempt 3

I had installed OpenSSH and Terminal a while ago on my iPod. Open Terminal, ssh root@127.0.0.1, give it root and default password alpine and I’m in. Next,

cd Library
mv Lockdown Lockdown.old
exit

But here comes the important part. I held the power button in and slid the bar to shut down. I turned it back on, and it came into Recovery Mode which iTunes refused to dock with because it required a lock code. I can’t unlock it until I connect it to iTunes which I can’t do until I unlock it…Right… So, what’s there left to do? Fix it. SSH from my computer into the Touch (PuTTY, same settings as before) and issue these commands:

cd Library
mv Lockdown Lockdownold2
mv Lockdownold Lockdown
exit

I truly don’t know why after getting rid of Lockdown and then putting it back (the old one) it suddenly worked. Anyways, feel free to try this AFTER BACKING UP! Lol, don’t make the mistake of screwing it up out of warranty and having no backup.

Discontinuation of Blogging

March 26th, 2009
The traffic on theajblog.com and aj-software.net since January 1. The spike is when I was featured on hackszine.com.

The traffic on theajblog.com and aj-software.net since January 1. The spike is the result of being featured on hackszine.com.

What?

You heard me right. Due to time constraints, just to name one of many factors, I have decided that it is in the best interest of my own health to discontinue the frequent use of my blog. I may still blog occasionally, but not anywhere near the every-other-day it has been. To my understanding, there are currently 13 readers who have subscribed to my RSS feedburner feed. To them, I say this: thank you. Thank you for taking part of your valuable time to read what I have to say and my opinion in this world.  Thank you for listening. Each and every one of those 13, you encouraged me. Much appreciated. And to the 1.2 thousand visitors since the beginning of the year, I hope you enjoyed it as much as I intended.

The Previous Saga

So, there’s a story behind everything that’s happened so far. Almost three months ago, I began to read the book How to Make Money With Your Blog (ISBN 0071508570). One of the most critical factors there, along with getting good links in, was to blog frequently. I decided to do an experiment, and post every other day, monitoring visitors with Google Analytics. Extremely little change for about a month. One day, of course in the shower, I imagined a relatively wonderful idea for watermarking. So, I wrote about it, and then, I submitted it to hackszine.com. They were very nice. I was up there, and got almost 500 people to click through to my blog from the example provided. The sad part, however, is that that resulted in very little. As my page fell further and further down into the archives, so did my traffic. Right now it hovers around 30 peeps/day. Worst of all, I have made not a single cent off anything on this blog. Sure, someone clicked an ad, but it never accumulated to the minimum $100 payout. In the last week, my mind has been very stressed on ideas. I’m actually planning to work on a rather large other website project, hosted somewhere secretive right now.

The Future

I may blog occasionally. But for me, money from my blog is impossible. It’s no longer fun, and I spend important time writing for this when I could be doing other things. This new project is huge. It will eat my life. I’ll do it, but I can’t do it and this simultaneously. It’s like rubbing your stomach, patting your head, and playing a piano. At once.

 

Sorry, 13 readers. Sorry 1.2 thousand visitors. Sorry friends.

 

It was nice while it lasted.

Zach Barth’s New Game: Конструктор

March 24th, 2009
An image released days before the game, hinting at it. Copyright Zach Barth, used without any known permission.

An image released days before the game, hinting at it. Copyright Zach Barth, used without any known permission.

Who’s Zach Barth?

Zach Barth is the creator of zachtronicsindustries.com. He was most widely known when hackaday.com published a quick article about his awesome reverse engineering game, Ruckingenur II. That was also when I discovered his site. Unfortunately, I managed to defeat the game in less than a day. But it was still cool, and I also loved the music. So, I decided to scan his page with an RSS reader and wait until something new came. After that, he introduced the Ruckingenur Challenge. The Ruckingenur Challenge was a competition to design and code a level for a new Ruckingenur game. I did so, which’ll remain a mystery until it’s published in a complete form by Zach himself. It involved the infamous OMISSAT, which is (partly) based on a real hack.

Russian? WHY?

Well, I don’t actually know why the title’s in Russian. Everything else is English. It’s about creating chips, like those inside your computer. No potatoes. Although they’re good too. You get a goal of a signal to reproduce, and make little transistors on the grid to work with and manipulate the stuff. It’s so cool. Best of all, it’s flash, unlike Ruckingenur which was written in .NET limiting it to Windows. Great stuff so far!

ICMP Tunneling - ICMPTX

March 22nd, 2009
An Ubuntu console, with an ICMPTX client running.

An Ubuntu console, with an ICMPTX client running.

ICMPTX?

ICMPTX is a mostly linux software project to permit tunneling IP packets across ICMP pings. Why do this? To bypass restrictions. Ever go to a seemingly free hotspot, only to open your browser and discover the hotspot owner’s site, rather than your target? You can get around this if, like almost all hotspots, pings are permitted. Your computer, with the help of the software, will redirect all your internet traffic through the ping port in the form of a ping, and the server at the other end will return everything you requested. The biggest problem in my case with this was my OS and a server. One of my nicer, shared hosting plans had some decent control, but of course, I couldn’t superuser it. That doesn’t work. So, I had to go to a home-hosted server concept. I would simply install Ubuntu or something onto an old box, get ICMPTX going, maybe some router tweaks, but it would be simple. Wrong! Ubuntu on its own took me well over an hour to get going. Then, I still haven’t been able to properly configure the tunnel. I think there may be some issues further down the pipe, along with my own already. So, there I was, spending hours on hours trying to get a really cool thing working when I probably should’ve been studying for a test. Oh well! Trial and error.

Skype - Really, Really, Really Cheap Phonecalls

March 20th, 2009
Skype, as seen in a gloomy room. Classifiable as "blah photography."

Skype, as seen in a gloomy room. Classifiable as "blah photography."

Skype - Awesomeness

Skype has existed for quite a while. So this is truly nothing new to majority of the world. However, I’m really actually sometimes skeptical about technology, and had refused to bow down to it. Then, one day, I had to collaborate with a friend who also used Skype. That was when it all started. They really got me with that free phone call. Of course, I called my house, and that really stunned me. Mostly it the fact that I had pressed a button on my computer and managed to cause all the phones around me to start to ring. I tried it again, and it replied to say that I needed to buy “skype credit.” Buy? Nope. And that was the way it stayed for a few months. I used it here and there, nothing big. Not enough to buy anything. One day, out of curiosity, I checked out the pricing. Again, I was stunned. Only ~$2.50/month for unlimited US/Canada (real phones)! I jumped onto the Skype bandwagon from there onward. Purchasing a subscription, I then called my house again. And again. And again. It worked, and cost nothing beyond the monthly fee. It worked! The only downside was that finding a local area code was nearly impossible for an Online Number. Even finding one in my state was hard! And, getting a number is like buying another subscription, after the discount, money-wise. So, I didn’t. But now, my skype forwards to my cell, and I am very happy. (Hopefully not) the end!

The Tangible Countdown Timer

March 18th, 2009
An application I created to control a USB7 from a computer's serial port.

An application I created to control a USB7 from a computer's serial port.

The USB7

Quite a while ago, I discovered the USB7. It wasn’t until recently I actually thought I would have a use for it if I were to buy it. I was working on a website project due at midnight on a particular day. I was thinking how awesome it would be if I could have a bunch of LED 7-segment displays counting down the days, then hours, then minutes, then seconds, and finally hundredths of seconds. That was when I remembered it, the USB7. The USB7 is a relatively inexpensive, usb-controlled kit with six 7-segment displays. I haven’t seen many popular projects for it, though, so what does one do when there’s a need for something but it doesn’t exist? You make it! I bought a kit online, so it’ll arrive sometime later.

The Programming

Turning to Visual Studio Express 2008 and my brain’s Visual Basic abilities, I created this super-simple application that continually updates the display with the time remaining, fitting as much data as possible. For example, it can show up to 99 days, 24 hours, and 60 minutes when there’s more than 24 hours left. When there’s less than that, but still more than an hour, it’ll display a 2-digit hour code, a 2-digit minute number, and a 2-digit second number. Once you’re down to minutes, it shows minutes, seconds, and hundredths of seconds. Down to seconds, it’ll drop the minutes. Finally, once the timer’s up, it plays a crazy alarm sound and flashes constant zeroes all across the display. Now just to wait until it arrives!

Quick Comparison of (Programming) Languages

March 16th, 2009
Visual Studio is a non-free environment for the Visual language series.

Visual Studio is a non-free environment for the Visual language series.

It’s Good to Know

I had no idea about the differences between languages when I started to program. At first I learned HTML, then I went to Visual Basic. That was the mistake. Visual Basic is only available on Windows. After that, I seemed to want to continue to step down to lower and lower-level languages until I got to the base of it all. I’ve nearly succeeded, and went to C++, tried some Assembly, then turned to chip languages. I’m so far at Arduino/Wiring and some C. So, I want to give a ultra-quick comparison between common programming languages.

Visual Basic

Based off of original BASIC, Visual Basic is Microsoft’s .NET version. Compiled programs will only run on Windows or emulating environments, such as WINE. It’s a very simple yet powerful tool that can produce very nice GUIs.

Java

Cross-platform, Java is slightly slower, requires a JRE on target machines, is harder than most to learn, and requires skill to produce neat GUIs.

C++

Pure C++ has no built-in UI functions. Usually, OpenGL and other libraries are used. Very powerful, unmanaged code requires you clean up your memory mess or else the used RAM is not usable until reboot.

Python

Another powerful scripting language. Very popular, simple.

Lua

This is a very minimalistic language. I’ve only seen it used in odd little places like World of Warcraft addons and game scripting interfaces. In both cases, special functions are introduced to do other things in different languages. Lua interpreters can be integrated in many places where simple scripting is required.

Processing

Processing is very commonly used to create mathematical art, due to the easily accessible drawing functions. It is also used for interfacing to serial port devices and graphing or manipulating the data they send back.

Synopsis

From a job perspective, you should learn what the market seems to need at that particular time. For hobby things, use whatever you can do and think you’d like. You can almost always learn something different later!

Organizing Parts

March 14th, 2009

A common household drawer module combined with a label maker makes for a very organized parts system.

A common household drawer module combined with a label maker makes for a very organized parts system.

Organization is Crucial

Organization is crucial in almost every aspect of life. One of these aspects, as a tinkerer, is being able to find parts easily. I must admit that my floor where I work on projects is littered with failed, partial, or abandoned experiments. For example, one of the things I lie among is a pencil sharpener with four wires coming out to an ominous control box. I often lose parts, only to find them months after the intended project is over. So, I turned to a drawer thingy like in the photo, and just labeled all the drawers accordingly. I have everything from “scavenged little things”, “screws”, and “alchohol swabs” to “chips”, “relays”, and “piezos”. Unless the drawers get really full, they all pull out easily and I can see what’s inside before that even. I want an LED for my Arduino, I pop open the top left drawer and fish around for a good one. Being my geeky self, I get a similar happiness as if each LED was a candy and I was a kid with some spare change to spend. This system has paid its self off in the time saved not looking everywhere and digging everything up in a search.