Terry C. Martin

Wednesday, August 01, 2012

China Blog - Day 1 & 2 Synopsis

This is probably a better mechanism to give a longer account of my stay in Asia, China in particular. Sorry for the lack of photos but I seem to be having horrible problems uploading photos from this country, even with VPN. I don't know what's going on...


Arrival and Temporary Customs Detainment
So, on day 1, we arrived in China, from South Korea and while going through customs at the airport, I was pulled aside with no explanation as to what was wrong. I was told to have a seat in an area off to the side and to look into a security camera indefinitely. My guess is that they use facial recognition software to match the identity of someone to their passport photo and the software was having trouble with me. Needless to say, my wife and I got a little nervous, as did the western couple behind us. However, after about 15 mins. of sitting and staring into that security camera, I as allowed to enter without further incident.

Diversity of Cars


I was immediately struck by the amount of variety of cars on the highway leaving the airport to go to my wife's friend's apartment in Beijing. There were a great deal of western cars such as BMWs, Volkswagens, Nissans and Toyotas and especially Korean cars, Hyundai & Kia. Oh, also some American cars too. I found this a bit surprising only because I have been to South Korea several times before and never saw that much diversity in cars, especially western cars, until this very trip (to Korea).

Starving
It was early morning when we arrived at the apartment and my wife's friend decided to take her to a beauty salon immediately, leaving me alone with my two sons. By around noon, I started getting hungry and there wasn't much to eat at the apartment so I decided to attempt to go out into the mean streets of Beijing to find some form of fast-food and hopefully NOT get lost. Now here's the thing, I know a number of Mandarin expressions and can even take bits of those expressions and string them together into something that might seem as though I can sort-of speak Mandarin. However, I'm coming to realize those expressions are more useful to me in America when encountering Mandarin speaker there, than they are here. They're expressions like, "Where are you from", "Do you speak {language}?", "Where do you live?", crap like that. NONE of those expressions are particularly useful IN Beijing LOL. I do however, speak a fair amount of Korean. My listening comprehension is pretty horrible, but I can speak somewhat fluently. So, after leaving the apartment, I immediately realized I wasn't as certain as I'd thought I'd be, of which direction to start walking. But suddenly, I heard a woman talking to her baby in... Korean! I immediately went over to her and asked her if she was Korean, to which she replied, "No.", to which I replied, "Ok, but you speak Korean?", to which she replied, "Yes.". And so I was happy to be able to fully (more or less) communicate with someone and more importantly, get directions to the nearest fast-food joint. As it turns out, my wife's friend lives in a sort of Korea Town section of Beijing.  So, I walk about 15 minutes, in light rain, without an umbrella, and find a McDonalds. This McDonalds is not like any other I've ever seen though. It was VERY basic and none of the familiar menus with big pictures were to be found. It was at this moment that I thought to check my wallet and realized I hand't gotten any Chinese money from my wife. We skipped exchanging money in the airport because back in Korea, my wife's cousin's husband, who's a banker and is about to go to Vietnam himself, privately exchanged some of our American dollars for Korean and Chinese money at a better rate. I never bothered to get any of that money from her though. So, I realize I'm broke, except for my Discover and Visa card - neither of which they'll take. So I leave and notice KFC across the street and decide to go there. Now this may be the coolest KFC I've ever seen. I could tell that KFC must be a much more popular restaurant in Beijing, than McDonalds (which I'd heard numerous times but hadn't seen 'till now). However, not even KFC would take my plastic. So I had to hike all the way back to the apartment without food.

Beijing Traffic
During my walk to and from the fast-food joints, I got to see first-hand, just how different people treat traffic here. Basically, they act like there are almost no traffic laws at all, especially pedestrians and people on motor bikes. They seem to just go whenever they can with little to no regard for oncoming traffic. And some cars seem to do the same as well. Standing at a light waiting to cross, you may start to feel a bit stupid as others just go whenever they can.

Weather
It's been rainy since we got here two days ago, however, today, Thursday (I think), the sun has finally come out.

Saturday, March 12, 2011

iPad 2 with minor Xoom comparison

I just bought the iPad 2 today. It's the first time I've ever stood in line to buy a new release of anything. I'm not quite an Apple fanboy yet, but I can see I'm slowly falling for their products, at least, their consumer electronics, not so much their general computers. I'll first say, this thing is kind-of impossibly thin. It's a little hard to believe they fit everything they did, into a package that thin. I recognize some of it is just an illusion created by rounding the edges (a very smart move IMO) but still, the thing is impressively thin. It really does feel great in the hands. So, right after I bought the thing and played with Best Buy's demo for a couple of minutes, I wandered over to the Motorola Xoom for a quick look/feel. It's pretty thin too, certainly thin enough. However, I also noticed it felt quite heavy, especially after just having handled the iPad 2. It is certainly a sexy device though, and aspects of its interface are gorgeous. I say aspects are gorgeous because there are a few rough(ish) edges still. The widgets and icons on its screen aren't always very neat or orderly. I feel like they could still do a bit better with that. One thing that really bothered me on the Xoom was the placement of the speakers. I think Motorola made a fairly horrible decision to place them on the back of the thing, facing away from the user's ears. It gives the sound a somewhat muffled sound which compelled me to flip the thing over so I could hear the sound coming directly at me. When I did flip, the sound was just fine. That's going to bother a lot of people, I'm sure. What a horrible decision. I get that they probably did it to put two larger speaker on the thing (where else could they've gone at the size they are and still have two), but perhaps two smaller ones on the sides or bottom would've sounded better. One other non-technical problem was the lack of software on the thing. The iPad demo machine had plenty of stuff already loaded on. The Xoom seemed to have next to nothing. That's really stupid. The apps which showcase the thing, should be at the forefront.
Anyway, back to iPad 2. The cameras are next to useless as I expected. Garageband is absolutely AWESOME!!! I hope to see some additional instruments that can be downloaded for it though. I think that app has the real potential to actually revolutionize some aspect of music input. Don't let the mere $5.00 price tag fool you into thinking it's just a toy. It's an incredibly capable little app, considering what it's running on, and sounds nice too. One thing though - after I installed it and ran it, the sound wasn't playing back correctly at all. I fiddled with it for a bit before I decided to try rebooting the iPad (hold down the iPad's only button while also pushing the 'sleep' button on the top right of the device and don't let go of either until you see the apple logo). After the reboot, Garageband was playing great. Fantastic app!!

I can't stress just how diminutive the iPad 2 feels and looks. It's so petite that I truly have reservations about allowing my 7 & 10-year-old-sons touch it outside of my supervision. My boys are as great as boys that age can be, and not too destructive, but the iPad 2 is just so thin, I'm afraid it could be stepped on or sat on so easily because it might go unnoticed. I don't have that same level of fear with the iPad 1.

Final words... I think the iPad will make the Xoom feel fat and dumpy (probably look fat and dumpy too). I say it's an amazing feat of engineering in terms of what they put in it, with battery life, combined with size. Despite the crappy cameras and same resolution screen (which isn't horrible btw), I'm very happy and impressed so far.

Tuesday, March 01, 2011

Netbeans Beta 7.0 - Introduce Field

Here's another one - this is less functional than Eclipse's version. Let's say I have this code:

GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();

in a method and I decide I want ge to become a field in my class. In eclipse, I'd select ge and choose 'convert local variable to field' under the 'refactor' menu. Eclipse would then replace the left side of that statement: "GraphicsEnvironment ge", with just "ge" and it would create the field up at the top of the class.

In Netbeans, I apparently must select the right-hand-side of the statement, then choose the Introduce Field option under refactor, which will ask me to create a field name, rather than take the field name I already created. This sucks because it won't just use the declaration I already have, 'ge' in this case. That means that if I already have code below that declaration, which is referring to my variable, and I then introduce a new field with a new variable name, I have to go through the hassle of replacing references to the previous variable with the new field name.

As I mentioned in my previous post - please Netbeans devs, just copy the functionality of Eclipse/IntelliJ... VERBATIM. Don't try to be innovative or different. Just blatantly rip-off the other two players. Only after you've shamelessly ripped the other guys off may you then proceed to innovate.

Friday, February 25, 2011

Netbeans 7.0 Beta

I'm thoroughly an Eclipse user and have been for about 7 years now. I love my frequently-used key bindings. However, pretty-much every year, I revisit an old friend - the IDE I started with (more-or-less) in the Java world, Netbeans. It all began around 1999, or maybe '98, I actually don't quite recall. Back then, it was called Forte4Java and it was slower than molasses (to be fair, all Java apps were at that time). Back then, I didn't really know what I was doing and wasn't doing Java development full-time, I just played with it from time-to-time. I eschewed Eclipse back in the early 2000s for its lack of completeness for the kinds of tasks I frequently did back then. Namely, I built web apps for deployment on big-bloated app servers. I didn't know ant at the time, so I thought Netbeans was awesome because I could start a web application project and it would build my war file for me. It was a mystery to me, how some of my coworkers were building their web apps with Eclipse. I now know they weren't - being forced to write ant scripts to war up their files instead. Eventually, I found myself at a job where I was forced to use Eclipse, actually WSAD. Somewhere along the line, I decided to really learn the more frequently-needed key bindings and within a very short time, they became so indispensable that I began to feel somewhat crippled whenever I visited Netbeans. Each year though, I download the latest offering from Sun (now Oracle), in the secret hope that they've finally reached parity with Eclipse in terms of refactoring and editor intelligence.
I recently started writing a Java-based game engine for my 10-year-old son to possibly use. I started off thinking I might try to teach him J2ME (not that I know it myself) so that he could code for the little Java-capable phone we allow the kids to share when they go out. I liked the mobile development add-ons in Netbeans, so I went ahead and downloaded the latest beta. After a while, I began to think I needed a game engine that would be simpler than what I was seeing with J2ME, so because of that, plus curiosity as to whether I could do it, I decided to try writing one myself. I guess I just stuck with Netbeans partially to give it a thorough going-over and thinking that perhaps it'd be a bit simpler for my 10-year-old to get around in (compared to Eclipse, which can still be a bit spartan out-of-the-box).
Anyway, the first thing I did in Netbeans, this time, was to immediately turn on the Eclipse key bindings. I've been fairly pleased with the 'emulation' shall we call it. It's been better than I remember from previous iterations. However, the whole thing that made me want to write tonight, is one thing that I JUST CAN'T UNDERSTAND! I wanted to inline a method that I'd mistakenly factored out, and to my great surprise, there apparently is no function to do it. Truly, I just can't understand this. I've long been puzzled by many of the refactorings that have been missing from Netbeans over the years, and I suppose this should not be any different. I'd really like to understand why they don't just go ahead and blatantly rip-off EVERY refactoring that exists in both Eclipse & IntelliJ (which by now, should probably be about the same anyway). Is it really that hard, all these years later? I just don't get it. Are they trying to prove a point, as if to say "We've gone this long without implementing all their features. To do so now would be to admit to failure.". If that's the case, I've got news for you, Netbeans developers, you pretty-much have failed as far as I'm concerned. I've heard of no shop where Netbeans is in large use other than (and I'm assuming this) Sun. What's really bad about it is, this doesn't have to be the case. They've been so great at developing an IDE that comes with virtually everything a typical Java dev would need, right out of the box, EXCEPT ALL THE STANDARD REFACTORINGS! Come on guys, just make a list of EVERY refactoing in Eclipse, then implement them. Pretty please! You can do it. I have faith in you.

Sunday, January 02, 2011

GarageBand/iLife from a Linux/Windows User's Perspective

I bought a MacBook about 6 months ago because I REALLY wanted to do iPhone development for a few ideas I'd had, and the only Apple-approved way is to break down and by a Mac, which I wasn't crazy about doing. Anyway, I bought this thing and for most of the time I've owned it, I've used it for nothing but iPhone development and web surfing. I also have a Thinkpad T60 that's nearly 4-years-old now and that's running Ubuntu (10.04 currently). I've pretty-much loved that laptop with Linux on it. I wasn't too impressed by the MacBook compared to my 4-year-old Thinkpad. Apparently, Apple thinks laptops no longer need hard drive indicator lights. The problem is, with only 2Gigs of ram on the thing, and the fact that I'm using it for XCode development, I guess resources get pretty run-down to the point that when I click on certain buttons to have things done, I don't always know if it "heard" me or not, and it gives no indication... at least not for a while. That's VERY annoying, because I either sit there like an idiot for a few seconds, waiting to see if it's going to do what I want, or get impatient and click the button again and then eventually it does the action twice or whatever (like opening a window).
However, I must confess that of late, I think I'm finally beginning to see some of what's good about the Macs. I've been a computer-based hobby musician for years and I'd heard about GarageBand for years but never paid much attention to it as I understood it to be an entry-level toy that came free with Macs. While I'm no recording pro, I assumed I was well beyond whatever software Apple would be willing to give away for free with the purchase of a Mac. Long-story-short, I'm becoming increasingly impressed with GarageBand in particular, and iLife (the suite that comes free with Macs and includes GarageBand along with video making software and photo management software) in general. While it is true that GarageBand doesn't have the level of sophistication I'm accustomed to using, I'm quite impressed with its ease-of-use and the level of functionality it does have for free. It's absolutely a useable piece of software for quickly cranking out at least quick demos or sketches. That's not to say one couldn't use it to produce real, finished music either. I think one actually could and I'm strongly considering attempting it. I find the environment very conducive to not wasting a lot of time with settings and crap. They give enough basic stuff with good enough preset patches for sounds and effects that you can get going quite quickly. I think I became completely sold when, for this Christmas, my wife decided to get the kids (and by extension, me) an electric guitar. I immediately proceeded to plug that bad boy into a USB audio interface I happened to have and the thing was immediately recognized by GarageBand (i.e., no driver installation necessary). In no time, I was playing numerous guitar effects provided by GarageBand and they all sounded great (I'm no guitarist so I wouldn't no the diff. but I am musically trained and I'm sure most others couldn't tell the diff between these effects and whatever might be considered high-end ones either). Then, I took another look at the lessons which I'd known were there but hadn't paid much attention to for nearly 6 months prior. OMG! Now I was even more impressed! I've known about 6 or 7 chords on guitar since my college days and that's where my guitar learning stopped, so these lessons were perfect for both me and my boys. Within a day or two, I'd reached a level of comfort with the electric guitar that I was already trying to incorporate my own playing into my own songs, with guitar at the center! My older son is coming along nicely with basic chords too. In fact, I went ahead and bought the updated iLife '11 few days ago because I wanted the newer lessons and the ability for it to "listen" to our playing and score us on our accuracy. It actually works pretty darn well.
One of the things that blows me away about this software is the fact that in the past, on Windows, if Microsoft gave away free software with an OS, it was understood (at least by me) that said software would be VERY entry-level, i.e. fairly useless and not much worth bothering with. I just assumed the iLife software would of similar ineptitude. I've always felt Macs are overpriced for the hardware, and I'm still not all that blown away by the OS in general as compared to just running Linux, but if you're at just the right level of interest/ability in music or video making or something of that nature, I can now see how the Mac fills a really nice spot. In fact, I'm now strongly inclined to buy one just for the kids. You should understand what that means, coming from me. I'm someone who's all but banned the other commercial OS, Windows, from our home. My kids use my Linux laptop or my wife's Linux desktop for all their computing needs other than taking guitar lessons on GarageBand. I've gone WAAAAYYYY out of my way to allow them to get by without Windows (mostly... VirtualBox is the only way they're getting to Windows in this house and the kids don't know how to start that). The problem is, Linux still just isn't the well-supported easy-to-use OS that Windows or OS X are in SOME ways. I kind of like the thought of having another OS option that's more mainstream than Linux but ISN'T Windows (although I still don't have my perfect solution for my kids' ChessMaster 10).
I'll just quickly add that iMovie has impressed me greatly too. Very easy to use and as I'm no aspiring Steven Spielberg, I may never outgrow what iMovie has to offer. So in closing, I'm beginning to see the light!

Sunday, December 27, 2009

Epson Artisan 810 With Ubuntu 9.10 (9.04)

I just purchased the Epson Artisan 810 yesterday, after having returned the Kodak ESP 7. Quick word on the Kodak ESP 7 - DON'T BUY IT if you run Linux! I wanted to configure my new, shiny printer to print/scan over the network - just to see it work. The first thing I learned was that my printer seems to be a little flaky about picking up and keeping a DHCP-allocated IP address. This could be due to my not having read the manual, but it appeared to initially pick up an IP and allow me to see it via Ubuntu's Printer searching wizard, but after fiddling with other things and unplugging and moving the printer around, it seemed to have lost its ability to pick up an IP again. I'm not saying it's the printer's fault, but I couldn't figure out why it didn't consistently pick up (or retain) an IP address. I eventually relented and assigned it a static IP and that did the trick.

Next, you'll need to install libltdl3 library. There's something screwed up or changed with this library from 9.04 on apparently. You can grab it here. If you're reading this in a browser in Ubuntu, when you browse to there and choose a location (i.e. North America or whatever), the download should start immediately (if you chose to open the file in Firefox - otherwise you can save it and install from command line if you know how) and will probably launch the deb installer which should be fine. This library is needed for the next part.

You'll go here, choose your printer, answer their questions and then you can download all kinds of drivers/software for Linux for your printer. You'll need to grab: EPSON-Artisan_810-pipslite-en.ppd and save it somewhere of note. You'll also grab: pipslite_1.4.0-5_i386.deb. Again, this will likely result in the deb installer starting (if you choose to open it in the browser) and it should install without a hitch if you installed the libltdl3 library from the previous paragraph.


Now, make sure your printer's on and connected to the network (wirelessly or otherwise) and in Ubuntu's menus, go to System - Administration - Printing. A small window will open.
Choose "New" in that window. It'll search for local & networked printers. If your printer's on and connected to the network, it should be found. Click on "Network Printer" in the resulting window. You should see your printer (I actually see it twice for some reason - I choose the one with 'EPSONFF05DB' in parentheses). Choose it and select "Forward" button. Ubuntu will search for drivers and probably shouldn't find them, so it'll let you choose one. Select "Provide PPD file' and use the little file-chooser drop-down to browse to the EPSON-Artisan_810-pipslite-en.ppd file you downloaded and saved earlier. Click "Forward" - then "Apply". It'll ask if you want to print a test page - you can choose "Yes" at this point and try things out. You should see a new Printer icon for your new printer in the little "Printer configuration" window where you earlier chose "New". Your print should come out and all should be mostly well with the world. It may be a little slow getting started on the print if you're on a wireless network - something to be mindful of.

Now, let's get that printer going too...
Install iscan_2.23.0-3_i386.deb from that same site you got the other deb files. This is a program that allows you to scan using all the Artisan's capabilities (although XSane seems to do everything too - plus more probably).
To be able to do network scanning, you'll need to install iscan-network-nt_1.1.0-2_i386.deb from the same place you got the the pipslite and ppd files. This is like a driver or plugin (or something) for the iscan & SANE packages that's responsible for scanning in Linux that enables iscan/SANE to see networked scanners as local scanners (I guess). Install this deb file just like the others.

Finally, open a terminal (Applications - Accessories - Terminal from Ubuntu's main menu). Type: sudo gedit /etc/sane.d/epkowa.conf (substitute gedit for vi or whatever you like)
At the very bottom of the file, add a line like:
net 192.168.1.5
Substituting '192.168.1.5' for whatever the IP address is for your printer. If you allowed your printer to use DHCP and got it working, you'll have to determine if your DHCP server (which is often your router too) is associating the IP address it allocated, with a name. If so, you can use that name to refer to your printer instead of the IP address. This is kind-of key so be sure you know the name or IP. You can test the name buy pinging your router form the command prompt: ping printername
Save the file.
then type: sudo /etc/init.d/saned restart
Now, launch Applications - Graphics - Image Scan!
If you did everything correctly, it should start up and you can now scan.
Put something on the flatbed of the scanner and click the "Preview" button. If an image shows up, then all is even more well with the world than before.
You're all set and ready to go!

BTW, you can scan from XSane (also under the graphics package in Ubuntu) too. It's about the same and let's you do OCR if you scan to Viewer (default I think) and then click the little button with letters on it. You will have to install 'gocr' for that to work.

Install gocr - open command prompt - type 'sudo apt-get install gocr'. Now you can do free OCR with XSane.

C Ya!

Thursday, May 14, 2009

JBoss Seam RSS Feeds on JBoss AS 4.2.3

I need to keep this short cuz I'm ready to go to bed. Ran into this error:

jboss com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to javax.xml.bind.JAXBContext (this is the top of the resulting stack trace rather)

when I tried to click on a link on my Seam app that links to an RSS page I created. This app with its RSS functionality worked just fine on my dev box, but prod gave me that error. Lemme cut to the chase... I ended up removing jaxb-api.jar from my war file (I unzipped it, removed the file, then zipped it back up and redeployed it) and that fixed the problem. Apparently, I had some other jaxb lib in my JBoss AS classpath... somewhere... causing that trouble. Incidentally, I was running the same version of JBoss AS on dev & prod and same JVM too. I don't even feel like searching around for the conflicting jaxb lib right now... just wanted to jot this note down cuz I'll almost CERTAINLY forget i encountered this issue before.

Good night!