I just got an HTC Droid Incredible last Thursday, so naturally I've been playing with it nonstop. It is admittedly my first smartphone, though I've owned my iPod Touch 2g for almost a year so I am well acquainted with apps. So far I really love the Google Android OS, which I expected given that Lifehacker recently recommended it over the iPhone OS for geeks. But nothing about the phone gave me more joy than a spinning cube.
Last night, I downloaded the Android SDK, installed it into Eclipse, and wrote some Java to create an app - a spinning colorful 3D cube, hardware accelerated with OpenGL ES. After it ran perfectly in the emulator, I connected my phone, installed drivers and ran a command to transfer it. My "OpenGL Test" app may not be any more than a spinning cube with no interaction, but to see it run on my phone screen is so rewarding, especially after so little time and effort.
And as I posted on Facebook shortly after: "I've had my iPod for one year; Apple requires a Mac to develop for it, so I have done nothing as far as coding on it. I've had my Incredible for 5 days; I just developed my first mini Android app, a spinning 3D cube, and deployed it to my phone." I think this is a definite win for Android, Java, and Eclipse!
If you have an Android phone and haven't touched the SDK, go give it a try! It's daunting at first but I promise it's not very hard!
Anyway, the whole reason I wanted to write this post was to ask about IBM and the Android Market (the equivalent to the iTunes App Store). IBM has no presence there! If we are trying to be leaders in Java, would it not make sense to develop some Android apps in Java, alongside our other Java initiatives?
For example, I think a slim WebSphere console would be neat. Let's say it's 3AM and IT guy Bob Smith is woken up by a call from a client; their web application is being hacked into, they're in a panic, and they want it to be taken offline immediately to stop the attack while they fix it. Normally, Bob would get up, run into his home office on the other side of his house, turn on his computer, VPN into his company, connect to the WebSphere server, and then stop the application. But what if it was as easy as hanging up with the client, tapping the WebSphere app, and tapping the stop button next to the client's web application. He wouldn't even have to get out of bed, not to mention the time saved.
Do you think this is something that IBM, or more importantly IBM's clients, would find desirable? Is there a reason for IBM's neglect of the Android Market?
Richard_Carter 2700037YQP Marcações:  blogs developerworks 5 Comentários 2.961 Visualizações
I started this blog at the start of the summer in hopes of posting some Java articles and tips, thus the name "Espresso". It ended up diverging from this initial plan, which is okay because it gave me a place to just talk about whatever I was thinking about or working on at the time. But in the process I also learned some interesting tidbits about this blog system, you (the readers), and myself.
First, I quickly learned that certain topics gained more interest than others. If you look through the list of my posts, you can see that my interesting (in my opinion) view of the taskbar being equivalent to a tab bar got very little attention. My first post, What is a "Web Service"?, had over 200 views, not bad. Pac-Man had a decent amount of views, as did my tip on cleaning HTML from a broken blog post. But my Android articles were on fire! Each article gained several hundred views in a matter of hours; and I'm very glad for that, I hope I got people thinking about how IBM and individual developers should consider the Android platform. And my recent post about Considering a New Laptop comes in third with over 400 views; I was just rambling about my thoughts on getting a new personal laptop.
Finally, I learned about myself: I learned that I am motivated to continue blogging by the views and comments I get on my blog. I'm not good at one-sided conversations; I have more trouble talking on the phone compared to talking face-to-face, because even though the phone relays my voice I'm still talking to an inanimate object. And when this blog feels like a one-sided conversation, I lose the motivation to keep blogging. But when I get comments which keep the conversation flowing, or even just a large number of views, I feel a responsibility to keep blogging! Such was the case with my second Android post, which I wrote mostly because the first one was so popular.
Thank you to those who have read my posts throughout the summer, as few and far between as they have been! Friday (8/13/10) is my last day, and school starts next Wednesday. I plan to keep up this blog by linking it to the blog on my personal website but I can't promise I'll post weekly.
Richard_Carter 2700037YQP Marcações:  websphere developerworks java 5 Comentários 3.685 Visualizações
I have spent much of today exploring that question: what is a Web Service? It is a concept that is tough to nail down, because it is only an idea. Its implementation varies widely.
If I were to give the most brief definition of a web service, I'd say that a web service is a server program on a network (usually the internet, the "web") that processes and typically responds to messages sent to it in its protocol.
Let's break that down:
A web service is a server program. It runs on a server -- a beefy computer which is made to be extra reliable so that it can run 24/7/365 in a data center. An "application server" is a program whose sole task is to allow for easy installation ("deployment") and control of server programs, and WebSphere is an application server.
A web service is on a network. It reacts to messages that it receives from that network; if it weren't connected to a network, then it wouldn't do much of anything. And of course, the most comprehensive and accessible network is the Internet, so what better network to connect to? However, some web services (for example, a corporation's payroll system) are kept off of the internet, and restricted to only a subnet of computers. The web service itself functions the same either way, and doesn't care (or know) whether it is connected to no computers, one computer, or the entire web.
A web service processes, and typically responds to, messages sent to it. Web services don't usually do things on their own, though the possibility certainly exists (for example, one web service might want to poll another web service at specific intervals). But their main function is to receive a message from a client, process that message, and optionally send back a response. A web service does this for a large number of messages from a large number of clients at the same time.
A web service has its own protocol. Whether it uses a standard protocol such as REST, or the designers invent a totally new protocol, each web service has a specific language, or protocol, that it "talks" in. The client program is expected to interface with the service using this protocol, and some clients are custom written for the web service, while others use a common protocol such as HTTP (in which case the client would be a web browser or HTTP library).
So a web service is just about anything that communicates to clients in order to provide a service. In fact, this website that you are reading from right now was handed to you by a web service, and it used the HTTP protocol to receive the browser's "GET" request and respond to it with the contents of the webpage. It is providing your browser the service of fetching dynamic HTML documents. If you are listening to Pandora or another internet radio, the radio software is similarly interfacing with a web service, which provides the service of streaming audio to your computer over the web.
Now that I'm clear on what web services are and I have learned about some protocols such as REST and SOAP, my next step is to explore Rational Application Developer for WebSphere in-depth and make my own web service for practice, so that I'm ready to teach the process to others! Along the way I hope to learn even more about web services and the way that WebSphere hosts them! Please feel free to leave any suggestions for learning material below; for now, I'm combing developerWorks for anything of interest (such as this introductory article on web services).
Yesterday I made a blog post and included an iframe in the post. I saved and everything looked okay; but I later got a complaint that someone couldn't comment or recommend my post. Indeed, when I looked at the post, the entire bottom of the page was gone! I went into edit mode to check out the problem, but the edit box was only a couple pixels high and there were no buttons to do anything to the post. It was stuck!
Unfortunately there is no easy way to recover this by yourself, and in many cases you should contact Bob Leah or Nick Poore; they have a tool to edit such broken posts. But I wanted to fix it myself, so I spent a few minutes going through the code and seeing what I could do. In the end, I succeeded at recovering my post on my own!
Next, go to the edit page of your post. We are going to find the contents of your post, fix them, and then simulate clicking the "save" button with Firebug.
View the source of the page (View > Page Source or Ctrl+U). Search for div id="richEditor" and look slightly before that. The end of your post is just before the </div> or </div> (depending on your browser), which is just before the search string. You'll need to copy the entire contents of your post, so highlight from this end until you reach the beginning of your post; copy and paste it into a separate notepad.
document.weblogEntryFormEx.text.value="YOUR POST HERE";
Whew. Now, be very careful next time you write HTML; make sure to close every open tag!
Richard_Carter 2700037YQP Marcações:  blogs developerworks browsers 3 Comentários 3.187 Visualizações
But I couldn't help but notice that my blog post looked great in IE6 and Chrome, but in Firefox, the paragraphs had no spacing between them!
So today I spent some time looking at the source and at the templates, and learning how it all works. Turns out my paragraphs were in <div>s. "What in the world? Why not use <p>??" I thought. After all, <p> does stand for paragraph; I've known this since the 5th grade!
Of course, I instantly blamed the developerWorks developers. But I shrugged, dove into the template system, and wrote a complex set of $util.replace() calls to properly replace the quirky markup with a nice <p> before each paragraph and </p> after. It was beautiful!
I opened up Firefox, and after a little CSS, my paragraphs were spaced just as I wanted them. Presto! I clicked around the blogs homepage to go see the other inferior blogs without spaces between paragraphs... But lo and behold, everyone else's showed up fine in Firefox. What??
Then it hit me.
And more importantly, how can this issue be fixed in developerWorks and other IBM web applications? Is the rich editor to blame or should the server be doing some fancy search-and-replace like I wrote into my template?
P.S., I wrote this post with Firefox, just to mix things up. Apologies in advance if it looks weird! Next post will come from IE6, and then I'll use the three as test cases to find the best solution that I (as an end user) can come up with. (then I'll post about it, of course!)
Great news! YouTube increased its upload limit to 15 minutes for all users of YouTube! Here is the official blog post about it.
On a funny note, apparently the reason that videos have been limited to 10 minutes is in an attempt to limit the amount of copyright infringement on YouTube; for example, if there were no limit then users would upload full length movies to YouTube. Of course, plenty of full length movies already exist on YouTube, split into 10-minute chunks, so this limit obviously did no good on that front.
I'm very excited for this raised limit, and it comes at a great time: a couple of my screencasts for my current project are just over 10 minutes. Now they will fit perfectly once I add intros to them! I was fretting over how to split them up but my problems are solved. Now I just need to figure out how to split the one that's over 15 minutes (!).
I've started thinking about getting a new laptop. It's a big decision for me, because I love my current laptop; I just get the feeling that technology has gotten quite a bit faster nowadays.
Three years and 9 months ago, I bought a Dell Inspiron E1705. It's a 17" laptop with a 1920x1200 screen, which is definitely my favorite thing about it. It has a great graphics card for its time, the NVIDIA 7900GS. And with a 2ghz Core 2 Duo and 2gb of RAM, it can still power through today's applications quite well.
I bought the laptop at just the right time. Starting around the beginning of summer, I spent a couple months browsing forums and reading all sorts of reviews on a variety of laptops. I set the amount of money I wanted to pay and a list of my priorities as far as features, and ventured out to find the best laptop for me. I discovered that the Core 2 Duo would be in laptops soon, and so I waited. And the day that Dell updated their site with Core 2 Duo options, I bought this laptop. It turned out to be an excellent choice, as the Core 2 Duo remained the top processor until just recently with the i3/i5/i7 offerings.
I hope I get as lucky this time. I'm just beginning research into what's coming soon. My priorities remain largely the same, as I am now in a concentration in game development and I will continue to need a large screen and the latest graphics card to play and create games.
So far I've got my eye on Alienware (though they are heavy and expensive), Sager (not sure about the 3-cell battery and build quality), Lenovo (there are one or two laptops with powerful workstation graphics cards which might work for gaming), and the Dell Studio XPS (but it might get discontinued soon in favor of Alienware). Are there any others that I missed?
Over the past couple days, I couldn't figure out why my WebSphere project wouldn't run. I was getting the following error:
This issue was complicated by the fact that I've been having two copies of Rational Application Developer open at the same time; each pointing to a different workspace, but both workspaces having projects of the same name. The RAD instances shared the same WebSphere server and apparently use the name as a unique identifier (as opposed to something truly unique like, say, the project's path on my disk). Needless to say, I had to rename one set of projects to fix this problem.ADMU0116I: Tool information is being logged in file C:\Program
Anyway, back to the above error. The startServer.log file hardly gives more information than the above, so I'll refrain from pasting it here. I didn't bother with a -trace option. So I was left with the likely causes: a) an instance of the server server1 is already running, or b) some other process is using port 8880. I assumed that my server was not already running, since I was trying to run it, and went with option b.
Netstat to the rescue! ...or, maybe not. Running "netstat -a -b" showed nothing listening to port 8880. Maybe I was doing it wrong.
Okay, so let's try something more powerful. Sysinternals has a lot of great tools, one of them I remembered for this use: TCPView. It's a slightly more advanced netstat; surely it would find what's hogging port 8880, right? Alas, just as with netstat, nothing was showing for port 8880.
Well then, maybe I'll just restart. Restarted... Connected to network... Minimized Lotus Notes... Immediately opened RAD and hit Run... Same exact error. Argh!
I tried some other things at this point; Googled for solutions, tried (unsuccessfully) to change the port and even the admin password on the WebSphere instance, tried to connect outside of RAD, etc. There was a lot of wasted time. Finally, I restarted and left EVERYTHING closed; didn't even connect to the network. I just immediately opened RAD and started the server instance, and it worked!
I then realized my mistake. All this time, I've gotten so used to IBM Lotus Notes and Sametime running in the background, and I make a point never to close it, so I didn't even consider it could be conflicting with WebSphere. But indeed, it seems Lotus Notes with Sametime is listening on port 8880, preventing my WebSphere server from starting.
I'm not sure the reasoning for this, or why netstat and TCPView didn't find it. I can't telnet to the port on localhost, so it doesn't even appear open to me. But yet there is a simple correlation: Lotus Notes & Sametime open, WebSphere fails; as soon as I close it, WebSphere starts. Finally I can finish my demo.
I remember when I was first exposed to Firefox. A friend showed it to me, pointing out that it had tabs. I didn't like it; after all, the taskbar is like a set of universal tabs -- why does your browser need its own taskbar?
I still sometimes wonder that. Why are the browser tabs so much better than the OS taskbar's application buttons? Isn't there a good way to merge these?
In some cases, such as browser tabs, yes I think they could be merged. I even wish they would be merged. It would standardize the tab system across all applications, prevent problems such as apps which don't support ctrl+F4 to close a tab (Notepad++) or which don't support middle-clicking a tab to close it (Lotus Notes). It might even make app makers' jobs easier, because they wouldn't need to implement their own tab bar; they'd just let the OS handle it.
But in other cases, this wouldn't work, for example where there are multiple sets of tabs. Eclipse, for example, has several window areas on the screen, each of which has its own tab bar. This is incredibly useful, and would be stifled if it were to be forced into one single tab row. In this case, a standardized tab system simply wouldn't work.
Unfortunately this is something of a chicken-and-egg problem; the OS makers and the application makers would need to work together to make one big change, and those types of things just don't happen often.
Do you ever think of your taskbar as an application window tab bar?
In my last post, I wrote about my first Android app, a spinning OpenGL-accelerated cube. I didn't release that one to the Android market of course; it was just a test.
However, I am proud to say I have now written an app, "RuneScape Map", and released it to the Android market! It is a tool for players of the popular online game RuneScape, that lets them view the large (12-megapixel) world map on their Android device. Of course, they can pinch-zoom and scroll around the map with their fingers.
It sounds like a simple app, but it actually took some clever tricks; the 12 megapixel image can't fit into memory -- in fact, if you try to view it through the Android browser, it's extremely low-resolution and if you zoom in, it is too blurry to read. It was a wonderful feeling to get it working, and even more wonderful to actually put it out there in the public.
Anyway, my point of this post was not to advertise my app; I doubt any one of the readers of this article plays RuneScape. I guess my point is, Android apps aren't tough to make, and they're a ton of fun to develop. If you are a Java developer, get started and you'll see what I mean!
All it takes is to download the Google SDK and read some of the documentation. There is plenty of material to read through Google's online reference. The SDK comes with an emulator which looks and acts like a real Android phone, right on your screen. You don't even need a physical device to develop apps (though of course you should test on physical devices).
Here are some good reasons for you, as a Java developer, to start Android development:
The SDK installs into Eclipse, so you can use the IDE that you already know and love. When you hit "Run", it launches the emulated phone and starts your application, or if you connect your real phone to your computer, it will automatically deploy it to your device!
The Android virtual machine supports most of the Java 5 libraries you already use. You can look through the package index to see if a certain library exists in the Android environment. The big omissions are Swing and AWT, which of course are replaced by the Android's custom GUI system (which optionally uses XML to define the layout of widgets!), but many libraries like java.util, java.io, java.math, java.net, javax.xml, junit, and so on are implemented just as you are used to. And there's even OpenGL support, which is great for someone like me who is looking to develop a 3D game in the near-ish future.
Your apps are portable. I don't mean cross-platform, I mean literally portable. Picture yourself in an interview, the interviewer asks about your prior work, and you just calmly pull your phone out of your pocket, tap the icon of your whiz-bang application, and hand the phone to them. I don't know about you but if I were that interviewer, I think I'd be impressed (assuming of course that the app is as thought out as the delivery). Or, see my other scenario at the end of my previous blog post, about the mobile WebSphere console.
There's a large, and growing, audience. Though the iPhone is ahead, the Android platform is growing in terms of popularity and number of phones. Many people (such as myself) prefer the additional customization and freedom that Android allows users, and many people (also such as myself) are migrating from "dumbphones" to smartphones.
There is a lot of untapped potential and plenty of room to grow. In my case, I searched the market for "RuneScape" and found nothing, so I developed an app myself. This kind of thing is common; once you have access to the Android market, go search for anything you can think of and see what's out there. There's a good chance you can find something that hasn't been made yet, so go make it! Fill that need!
I hope I have convinced you to at least consider the Android platform, if you are interested in these type of apps. If not, that's okay! But I personally find it very exciting to make something that runs on my phone, anywhere, and can do anything that I can write in Java.