04 August, 2012

Long Time No Blog

Hey readers (as if I have one :-)! My last blog post is more than two years ago. I really have forgotten about this blog already until Blogger emailed to remind me about it.

So, what's new?

I've been busy with work as usual and day to day "extracurricular" activities. There's so much had happened: my knowledge and career experience enhanced (but my other skills deteriorated as a trade-off). And the most recent significant happening is that I have a new employer. I just started to work for a particular IT company which I will not name here. My job is slightly different from what I am used to either as a consultant or a freelance contractor, because now, I'm hired to maintain an in-house product. Gone are my consultant days when I had to deal with different and unrelated projects.

Starting today, I'll be posting new stuffs in this blog but keep in mind that any statement posted in here is solely of my own and does not represent or resemble the views of my company. I'm not going to be serious and academic here. I'll try to be as casual and as "me" as possible.

I feel like blogging again even if nobody reads my post other than myself. I think Twitter has failed to kill blogging contrary to what other analysts predict; just 4 years ago, they thought blogging was going the way of MySpace--down to recycle bin. Yes, Twitter is something, but, blogging is another thing; microblogging can't just bury down blogging for the same reason as index cards and sticky notes have failed to replace bond papers.

One other conflicting ideas among analysts and forecasters today is whether or not social networking sites like Facebook can generate revenue from user information. Unlike Facebook, Google has steady stream of revenue from its search and advertising business out of publicly available information that the Web can offer. But can a social networking site sustain its hotness like Google does? Can Facebook sell information that its users mark as private? No. Facebook can analyze a user's private information and exclusively sell him analytics and convenience, but it can't sell or disclose his private data to others. And what if users finally become tired of worrying about their privacy and resort to the next cool past time? So, can Facebook eclipse the information giant that is Google? No. Even Microsoft armed with Bing! has tried hard and failed and still trying hard and still failing. Facebook, in order to keep investor optimistic of its stock value, should think of an effective business plan on how to monetize our statuses and pics.

And speaking of Facebook, I have one: https://www.facebook.com/ryandavs
and Twitter: http://www.twitter.com/ryandavs

Around the year 2006, I was designing and planning  a social networking site geared towards scientists, technologists, mathematicians, and other professions that are naturally devoid of social life (just kidding). I'm not talking about a social networking site to share pics, corny sayings and jokes, or even to shout out their misery. What I mean is a networking site that's collaborative in nature where they can share and review each others inventions, discuss about discoveries, review each others works, and to feed their ego and bragging instincts. The target audience are people in academics, senior professionals who want to hone junior minds, investors, various potential stake holders (e.g, environmentalists, anti-HIV/AIDS-related champions, etc.). This is not a site for you to just pick up other's ideas and inventions and hope to be rich out of it. Its principal purpose is to mimic the early community of open source/free software movements and to promote the culture of openness. Even before the Internet became a rock-star popular among consumers nowadays, those bearded bright folks had already enjoyed the liberty and benefits of collaboration that resulted to great operating systems, languages and utility programs that the software industry now freely enjoys.

By the way, I loathe patents on software and mathematical algorithms and formula. I'm relieved that the Philippines does not allow patents on software and I hope that it stays like this (I heard from the FOSS-folks that lobbying in the congress has already started to legalize software patents).

OK, going back to the social networking site that I wanted to create for the eccentric and virgin-at-their-30s geeks, there are reasons I did not pursue this. Having no funding is number one and the lack of solid business and marketing plan is the 2nd. But the other reason I didn't pursue it was because I had another software idea in mind.

Back in year 2007, I envisioned a software product that will revolutionize software development process. It will try to solve the software development troubles that have been bugging the industry since the 70s that even Atlassian and IBM failed to realize. I wanted to end the now became the norm which is the wasting of millions of dollars on failed software projects. Well, enough talking boastful bull-shit. The reality is that I'm just a loser, a failure, and just somebody who happened to grab a Scrum and Agile books and started dreaming nonsense. But this product that I've been longing to create is more marketable than that social site for the nerds. But without the eager will and the right money from investors, this idea is destined for the garbage bag (it's not even recyclable and even the rats and cockroaches can't benefit from it). Well, it's OK because I still had another idea.

A magnificent e-book reading software product that until now is still at the top of my list. Even before Amazon invented Kindle, and even before Apple invented its own ebook reader, I already had the still unchallenged idea of an ebook reader. So many ebook readers that are just sprouting today like mushrooms can't even deliver the 10% of the salable feature set that I imagined for my ebook reader. My ebook reader was born to create millions (millions of dollars, not millions of irked users). It was designed to create a market of its own. But where is it now? Well, to tell you the truth, until now, it just remains to be a prisoner of my thoughts and never will materialize. I'm still an ordinary employee who depends on the mercy of my boss. My dream of becoming a CEO by 27 and a millionaire by 30, has been realized in the person of a Steve-Jobs-wannabe, Mark Zuberckerg. I'm not bitter. I'm just jealous.

I'm so dying of frustrations. How will you feel if you had an idea, like that Siri on your iPhone, and you knew that it is feasible and you knew it would click like any touched-by-Oprah products. Yes, way back in 2004, I knew that it was possible to give the world a digital personal assistance, with personality, that can tell jokes to cheer you up and empathize with you when you're getting a divorce. But unlike Siri, my thought on this virtual assistant (or if you prefer, virtual girls) is to put it in the cars. So you have a virtual someone ready to talk to you and to entertain you while you're driving, and answer your questions, or give you advice, or just inform you whether it's not safe to go over 100km/h in traveling speed. People will pay for this software, and will pay again for the AI, and will pay again for upgrades, and will pay again for the personality (i.e., a voice of a girl in puberty will surely attract pedophiles). But who cares now? People will think now that's it's just a copy-cat of Siri, which by the way is downright inferior in my opinion).

Frustrations don't end there for I still have another product idea that will put Apple and Samsung to their knees. I won't mention it here, of course. It's not in the market yet, meaning, no one else has thought about this yet.... so far.

Now, I'm sleepy. I don't know what I'm writing here and why. Maybe I just miss writing. But to sum it up, the bottom line is what? That blogging is fun? Or that boasting and talking shits doesn't lead to wealth? It's up to you to draw conclusion.

(This is how I usually post. Random thoughts from a discomposed mind.)

23 March, 2010

5 Amazing Java libraries that you probably have never heard of

H2 Database - SQL Database written in pure and 100% Java. It can be used as embedded, server, or in-memory database. Batteries included; I mean, it comes with a web-based admin console to manage your databases. And the performance? Men!! Speed of light. OK, that's exaggeration. The thing is, performance comparison is hard to get right due to many factors. But if you're in the to-see-is-to-believe camp, I suggest that you test it yourself and see how it's jaw-dropping performance outshines its competitors. I will not say anything more about H2. I want you to try it yourself and feel the euphoric experience that leaves you loving your job as a software developer. But I have a bit of warning, though: When you touched H2 Database, you would never look back again to JavaDB/Derby.

Neodatis - Be free of Object-Relational Mismatch and get in touch with Neodatis. It's an object-oriented database that can be embedded or run in client-server mode. Unlike JODB and the other bigger ODB such as db4o, Neodatis is LGPL. Yes, it is the GPL with the L. If you are one of those NoSQL advocates, give it a try and spread the word. It comes with ODB Explorer, the GUI that you can use to manage your databases. But to be honest, ODB Explorer is crappy. You're better off using its API to manage your databases if you're not impressed with ODB Explorer.

MigLayout - Do you often literally cry when you're doing GUI with Java? Do you find yourself in a battle between you and the necessary evil which is the GridBagLayout? Now, don't fret anymore. MigLayout to the rescue. It is a Layouting engine for Swing and SWT. It is the third most requested RFE in Java. And the comments written in that RFE page ranges from a simple +1 votes to "I hate Sun" comments to absolutely dramatic testimonials. Need I say more?

BeanShell - This is the most useful vaporware I've ever seen in my life! It was supposed to be a scripting language that runs on the JVM. The syntax is just Java. Meaning, you don't have to learn a new language. I even have written a #!shebang script for Unix using BeanShell. I love this piece of software so much but it's not maintained anymore. The last update was on May 23, 2005. I can't believe it's dead while there was a JSR-274 for this. In my opinion, it became a victim of political maneuvering in the Java-Land. Or maybe, its maintainer got a job from a company that prohibits him/her from touching BeanShell again (a.k.a, "abandon-your-opensource-project contract"). Its opensource nature saved this vaporware for a fork was born, named beanshell2. The goal of this new fork is to continue BeanShell development under the hands of new maintainers.

======================

[update March 25, 2010: I'm feeling guilty for not including Winstone in my 4 original list. So, let me introduce you to Winstone. Read on...]

Winstone - Everyone speaks of Jetty. Everyone screams Tomcat. But did you know that Jetty and Tomcat are not the only options? Winstone is a Servlet Container with optional JSP compilation capability through Jasper library. Other features include AJP13, SSL, supports limited datasource definition and authentication realms, and can be run as embedded. But the feature of Winstone that I like the most, aside from being CDDL/LGPL, is its straight forward configuration and its 166KB single-jar. No mystical XML configurations that only vampires can understand. By just reading its short manual in a single HTML page, you will be amazed by its simplicity. In other words, it is "Simply Amazing!". I don't know if it utilizes NIO under the hood, who cares anyway? I'm not using it to run e-bay, twitter or paypal. But it would be really very nice if it's NIO-fied.

Combine Winstone, Wicket Web Framework, H2/JDBC or just Neodatis and you will have a just-enough mix of a simple web application that is so feel-good to create and maintain, blessed with a 40-year-old Unix Philosophy that "small is beautiful" and "less is more", and without the complexity-hell of IoC, Persistence API, Buzzword-Services® and JNDI/JavaMail/EJB/ETCETERA. And when you're drinking beer together with your pro-PHP, pro-Python and pro-RoR comrades, you can lift up your head and proudly say, "Hey, I can also build incredible web applications in a simplistic and non-overkill way!" But no need to mention that you can deploy your webapp on iPhone or Android, they might get filled with envy!

What other unpopular but marvelous Java libraries out there that you feel worthy of our attention? Please let me know.

26 August, 2009

12 May, 2009

The Design Pitfall

Design: one of the most ambiguous terms in software development

When we use the word "design" in our discussions, we sometimes end up misunderstanding each others and having a hard time explaining our point, until we accuse one another of not paying attention to listen to our arguments. The good news is that the problem is not "we" but the ambiguous word that we use: design. Design can mean many things especially in software...

==============

Areas of Designs that comprises web development:
Note: the hierarchy of responsibility...
Software Design sometimes involves Interface Design that involves both interaction design and graphic design. So

Software Design
|
|
Interface Design
/\
/ \
/ \
Interaction Design Graphic Design

Software Designer
He is believed to be the authority to be asked if an idea is feasible. He tells the manager what feature set can be achieved and how to achieve it. He is often seen working with system analysts asking the question "What are the requirements of this software and how do you want me to implement it?". If there is no system analysts, a software designer assumes this role. Software designer is always seen reading books and magazines, searching with Google, and standing in front of the legal department's door knocking to seek legal advice about patents, trademarks and licenses.

If the software requires user operation, then it's a must for the software designer to also consider interface design which can be the role of another expert in this field. Although a software designer knows the ins and outs of software internals, sometimes he is not adept when it comes to making a user-friendly user interface that people will love and get addicted to. Interface Designer to the rescue.

Interface Designer
The interface designer's job is, of course, to create an interface between the software and the user. User Interface lets people give commands to a software product and manipulate its data. An interface designer does not have to be a psychologist but at least has mastered the best-practices in creating a user interface which is known as the User-centered Design. Interface designer asks the software designer the question "How does this software perform its functions and who will use this software?" He works with the Software Designer, and constantly get pressure from the firm's legal, marketing, and sales departments. He even works with the writers. When the company gets into to a lawsuit trouble because the user interface discriminates the blind users in Europe, this interface designer, as well as the Quality Assurance Team, will be held liable. Tsk tsk... I don't want this job.

Interaction Designer
Your company must be like one of the big boys in the software industry (e.g, IBM, Microsoft, Google) to have the luxury of having a separate interaction designer. Interaction Designer works with his immediate boss, the Interface Designer. But typically, the interface designer is also the interaction designer because interaction design is a part of interface design.

Interaction design defines how the software behaves in response to a user's action. In the web, especially for the non-Ajaxified web sites, this software behavior is to display information to the user when a link is clicked, page per page. So in this case, the interaction designer asks the interface designer the question "Where is the IA of this software that I have to consider? In Web, IA, or Information Architecture is analogous to the taxonomy of pages, no more, no less. IA is defined by the interface designer and shouldn't be confused with Interaction Design itself.

Again, let me reiterate. An Interaction Designer is not really have to be a different persons from the Interface Designer.

Graphic Designer
Icons, colors, layout, and anything about the visual arts is in the hands of the graphic designer. The sales of the software may rely on the graphic designer's talent of providing stunning visual appeal to the software interface. But the manager doesn't see his value. He is always underpaid. He only gets rich by getting a kick back from his photographer friend whose photo he recommends to his company to buy. He reports to the Interface Designer, who gives him all his tasks, who accepts and rejects his deliverables. The good thing is, when he infringed on copyrighted materials, it is his boss, the interface designer, who will get into trouble with the managers.

This is the area of design where most immature software companies fall into the "Design Trap". Their managers think that GRAPHIC DESIGNERS ARE THE SOFTWARE DESIGNERS. This is dangerous because the developers and the software itself suffer when the deliverables of the graphics designers, who only knows about beautiful colors and his beloved Photoshop, becomes the specification that defines all the software intricacies including requirements and features, user interaction, IA, decisions like to-ajax or not-to-ajax, etcetera. It will be a TOTAL DISASTER for the entire team that extends even to the database and system administrators!!! Believe me, I've been there and I've seen it ruin everything.

==============

I hope we all learned from this piece of blog. You don't have to take this information seriously if you are only a small team. The only idea here that I want to convey is that the term "design" means a lot of things.

13 December, 2007

How to create a tag cloud? (With formula and sample calculation)

I googled on how to create a tag cloud. I found some, but, I didn't like their way of doing it because I think they did it the improper way. That's why I wrote this blog so that it's my turn to post something educational.

But before anything else, what is a cloud tag? Let me define it in my own words. Visually, it is a group of terms displayed with varying font sizes that are packed together so that it resembles a cumulus cloud. It is usually arranged alphabetically and center-aligned. Some tag clouds also have varying colors. In HTML, each tag is usually a hyper link. Conceptually, each tag isn't just a mere term; a tag in a cloud tag is a representation of an idea, a concept, or something that can be weighted; so, a bigger tag means a greater value or interest. (For example, the flicker tag cloud: http://www.flickr.com/photos/tags/ )

Now the question is how. How are the sizes of tags made vary? Simple. In HTML, just use the CSS font-size attribute.

Example:
<_a href="http://www.blogger.com/mylink"> tag item <_/a>

Look at the example above. If that looks strange to you, then stop reading right now and go away because you're not my target reader.

If you're still reading, then you know that that's an HTML tag for a link.

To have a tag cloud, you need many tags but with varying font sizes among them. That's easy, isn't it? But the hard part is generating those tags dynamically and computing the right size for the right tag.

What you need is a database of tags. Then query your database so that you have with you the list of tags and their number of occurrences. See the following table for example.

tags | occurrences
----------------------------------------------------------
birthday | 144
christmas | 108
valentines | 211
thanksgiving | 168
liberation | 88
halo ween | 114
new year | 140

The above table is our sample data. Each tag represents your customers favorite holiday. How can you present the tags as a cloud tag being the valentines day as the biggest (with 50px font-size) and the liberation day as the smallest (with 12px font-size)?

We will use the following variables, namely:
a = the smallest count (or occurrence).
b = the count of the tag being computed.
c = the largest count.
w = the smallest font-size.
x = the font-size for the tag. It is the unknown.
y = the largest font-size.


Now let's substitute the given values to their respective variables. Assuming that we are solving for the "thanksgiving" font-size.
a = 88
b = 168
c = 211
w = 12
x = ?
y = 50

And here's the formula:

x = (b-a) (y-w)
----------- + w
(c-a)

Or to put it in one liner (using c-like syntax):

x = ( ((b-a) * (y-w)) / (c-a) ) + w

And that's it. That's the formula. You might be wondering where I get that formula. Well, it's hard to explain here in words but let me still try. Using the "ratio and proportion" in Mathematics, the ratio of the distance between a and b and the distance between a and c is equated with the distance between w and x and the distance between w and y.

Or to make it simple,

b-a x-w
----- = -----
c-a y-w

Let's now continue computing the font-size for the thanksgiving. By substituting the values to the equation above, we will have...

x = ( ((168-88) * (50-12)) / (211-88) ) + 12
x = 36.715446
x = 37

The thanksgiving tag should have 37px font-size in the tag cloud. Try computing for the rest of the tag. You will get:
birthday = 29px
christmas = 18px
valentines = 50px
thanksgiving = 37px
liberation = 12px
halo ween = 20px
new year = 28px

--End

tip: When using Java, operate on float data type, not integer.

23 November, 2007

OpenSolaris Not Yet Ready For My Laptop

Recently, I blogged about the disaster that I experienced regarding the ext3 file system and concluded that I would want to try the Zettabyte File System on Solaris.

I have an HP Pavilion dv5600 laptop.

I downloaded and installed the Solaris Express Developer Edition on my laptop. This Solaris version is based on breakthrough development of the OpenSolaris operating system. But after trying it on my laptop, I learned that it doesn't support my HP laptop hardware yet. The Indiana OpenSolaris Developer Preview did not give me a good luck either.

Another operating systems that make use of the ZFS are the FreeBSD Alpha and the Mac OS X Leopard. I don't want to use FreeBSD which has the ZFS because it isn't stable yet. Mac OS X Leopard is too expensive for me; I can't afford it.

So, what now? I'm back to Linux. Linux is the best open source OS as far as the firmware/drivers is concerned. My Ubuntu Linux runs almost perfect on my HP Pavilion dv6500 laptop. But as soon as OpenSolaris is able to run on my laptop, I will always be willing to switch to it, only because of ZFS that I've been wanting to experience.

20 November, 2007

The hunger for a bite of Zettabyte

I've been using ext3 as my filesystem of choice since I touched Linux sometime in 2004. And I've never been very disappointed until now. There was a time that I thought that reiserfs is better than ext3 so I switched, but this reiserfs betrayed me when it's journal got corrupted and I could no longer recover my data. Badly irritated, I switch back to ext3 and I'd been so happy using this ext3 until yesterday.

What happened yesterday? I booted Linux, entered gnome, opened nautilus, then my computer hanged. I couldn't use the keyboard and mouse so I forced a shutdown to my computer by pressing my computer's power off button. And surprised! My computer don't boot anymore. GRUB was giving error 17.

What did I do? I downloaded Ubuntu Live-cd and patiently waited for 8 hours for the download to finish. Then I borrowed my friend's laptop to burn the ubuntu iso image. I burned it and booted it and run it. And from the running live-cd, I googled for troubleshooting the GRUB error 17 and found out that the ext3 partition of my hard disk no longer contains a readable data. I googled again and again but found no appropriate solution. When I realized that I've already spent half of a day googling and reading solutions but finding no real answer, my last resort was to follow someone's suggestion and that is to use the fsck utility.

I run the dangerous fsck....

done...

I rebooted but now GRUB gives error 15. I booted from the live-cd again to see what's inside the "rescued ext3 partition". To my surprised, the ext3 was then able to be mounted. I thought my problem was already fixed. But when I looked inside the partition. I was shocked. It only contains a single "Lost+Found" folder that contain full of directories and files with names I can not understand. Where's my data!!!! I shouted.

After all the hassles and boring journey of trying to rescue the corrupted
ext3 filesystem, my reward is a "lost of data" award. I lost the files that I've been keeping since 2001. I lost the project files that I was currently working on. Can you imagine how miserable life ext3 gave me?

Dismayed, breathing deeply and with crossed eye brows, my only solution was to reinstall a new OS. The data that I lost from that corrupted ext3 is a big pain in the a$$.

"If I'm going to install a new OS, what would it be?" I asked myself. I remembered there is a filesystem that they call as the Zettabyte File System or ZFS. I think it is the best file system available today. It is the default filesystem of any opensolaris distribution. It's maybe the right time to try opensolaris and take advantage of its ZFS goodness. What I want about ZFS is its ability to self heal and its defensive and careful approach to managing data. I hope, with ZFS, I will never experience again the same trouble that ext3 gave me.