CSS3 Photo Gallery Example

January 7, 2012

I was looking into the new CSS3 transformations and 3D capabilities for a photo gallery I was creating for my blog and created the following effect that acts like a spinner allowing you to spin through the images as if they were on a turnstile. The best part is that all the animations and perspectives are purely done in CSS. The only portion of the code in javascript is just advancing the images by updating the rotation of each image. Because the animations and perspectives are driven by the browser, you get more fluid animations.

Note that this demo only works in Chrome and Safari as required to support the Webkit capabilities.

Photo Gallery Demo

(more…)

0

Server vs Client-Side Rendering

January 5, 2012

I’ve come to a strange realization today. Several industry leaders and even some companies (http://d8p.it/17392,Leaving_JSPs_in_the_dust:_moving_LinkedIn_to_dust.js_client-side_templates_%7C_LinkedIn_Engineering.html) are moving to using Javascript and related libraries to move most code to the client for high scalability solutions.

In thought, that is a great idea. However, it’s a bit of a strange paradigm. Initially, there was only a handful of languages to program in. Then, there was only a handful of languages to write server-side web applications in. Then, tons more came to the scene. Why? Because no one language fits all cases. Some are more optimized at specific use cases and make sense. As a Java guy, I’ve used several of these, but each has their place. JSF works great in form-heavy, intranet sites. Grails works great in dynamic, database-driven systems. Struts has its place. Library Xyz has its place.

If the world moves to rendering more code on the client via Javascript, in a sense, we go backward (ok, not really, but bear with me). There is only 1 language on the client side: javascript. Yes, Google exposed us to Dart, but realistically that will never mean anything because IE, Opera, Safari, etc will never support it, just as Mozilla never supported Visual Basic on the web. Javascript is the defacto “scripting” language on the web and always will be (unless someone manages to convince the entire industry and the entire world otherwise).

Yes, I know there are a ton of Javascript emulators (coffeescript, dart to a degree, objective j, etc), but it’s still javascript. There are even a ton of libraries in JS to simplify it so you don’t feel like you are using JS. In the end though, it’s all javascript and you are bound to the browser support, performance, and bottlenecks (even more so in some cases where emulators make things easy but use crazy hacks in javascript to make it work resulting in expensive operations).

Anyways, I’m not trying to advocate one way or the other (I, myself, have not really made up my mind, yet). I just found it strange how the progression of web applications was driven server side by the advancement of new languages and methodologies. To purely go client side, you are almost binding yourself to a single language: Javascript. Worse yet, there is no real progression possible other than emulators, which always scare me (I prefer having control of what something is doing rather than a cross compiler or emulator doing it for me). Maybe in a few years, emulators and javascript will advance enough that we can have different languages and libraries that are highly performant making you be able to choose the right language for the right use case and job. Only time will tell.

1

Alternatives to 3/4G Naming

December 16, 2011
Tags: , , , ,

Currently the term 4G is thrown out there by carriers in a complete marketing purpose. Originally, 4G was reserved for LTE Advanced which is not expected in usage for 3-5 years prolly. Since then to one up each carrier they have made HSPA+ 4G. Now we have 3 distinct technologies (HSPA+, LTE, LTE Advanced) that are all considered 4G. Consumers end up confused by the marketing gimmick. To further confuse it, there are different speeds for HSPA+: 7, 14.4, 21, etc. Phones do not always support all speeds. In the end consumers are hurt.

As an alternative, why don’t we go back to the way modems or CD drives worked. For example, modems were once 14.4, followed by 28.8, followed by 56K. You knew exactly the theoretical difference from one modem to the next. It just made sense. We could easily do the same with mobile technologies.

Another approach would be to use a system like CD drives back in the day. They all baselines off a given speed and then became 2x, 4x, 8x, etc. Again this easily makes sense what you are getting from one case to the next.

Mobile carriers should think about this type of approach rather than confusing its end users with 4G that gets tossed around with no merit or meaning. Seriously, how much faster is 4G over 3G?

2

Why Do People Still Use Texting?

October 26, 2011

Question: Why do people still text when it is the biggest ripoff in history? 5,000% markup!

It literally costs carriers next to nothing to send a message. The message piggybacks all the other packets, so those packets would be sent regardless if a text is sent. Plus, the infrastructure is already built in.

So, why in the world do they charge $.25 a text? How is that not illegal?

The “real” answer…too many of us buy into it and the carriers make billions of dollars off of it. The biggest reason I hear is “well I already have unlimited texts”. Let’s do the math though. At $10/month, that is $120/year. At $20/month, that’s $240/year. If you are on a smartphone, cancel your texting plan and you can get a new smartphone every year. That just makes sense to me, which is why I explicitly opt out of texting and save myself the money. As everyone continues to move towards smartphones, it really does not make sense to pay for texting anymore. There are too many free options.

1. Google Voice
Google Voice gives you a custom phone number to which you can send and receive text messages completely “free”. When you pair that with a smartphone, the messages are delivered to your phone directly rather than as a text message. When you text someone, again it is delivered directly via Google Voice, but it is sent to the other person as a text. Case in point, you cancel your texting plan, save $20/month, and still get free texting. Why would you not do this?

2. Google Talk
For those on Android-based devices, they come with Google Talk out of the box. Simply sign in with your Google account and you can send messages to anyone else on Google Talk including iPhone users, desktop/laptop users, iPad/iPod Touch users, etc. For example, I use the iPhone application Beejive (highly recommended) to text my android friends. Again, completely free!

3. iMessage
Apple now offers the iMessage platform that allows talking to other Apple-device users without incurring texting charges.

4. Meebo
Meebo is another Instant Messaging client that allows sending messages to other users on any instant messaging platform (Google Talk, MSN, Yahoo, AIM, etc).

5. Facebook
As much as I hate facebook, people still want to use it. That said, they also offer a messaging platform to send direct messages without using text messages.

So, I conclude with the question again? Why would anyone pay for texting? Join the Anti-SMS movement and save yourself $20/month (go enjoy a nice dinner each month instead). Let’s all IM, not Text :)

0

3 Ways to Skin a Fibonacci

September 11, 2011

Fibonacci sequences and their calculations are always an interesting computer science question and sometimes even an interview question. There are endless ways to calculate a fibonacci value and mathematicians way smarter than I am have much better ways. This is really just a blog post on three simple Java-based solutions. In no way is this meant to convey an optimal solution. Rather, the intent of this exercise was to demonstrate how simple changes can improve a simple algorithm. Too many times as developers we quickly implement a solution (usually to save time) when a few extra lines or additional thought could improve the overall throughput. That being said, as you read this post, don’t focus on the implementation, but rather the subtle changes that improve the overall effectiveness.
(more…)

1

4 Reasons Samsung Should Buy WebOS

August 29, 2011

Is Samsung thinking about buying WebOS? I really like this idea if it’s true, although I really doubt it. I have a hard time believing Samsung would ditch everything (Android, Bada, etc) to concentrate on WebOS. However, I do believe that WebOS could benefit Samsung and the community. I think Android is a great concept, but its execution was only truly successful because it was a free alternative to Apple allowing phone manufacturers to jump in the game quickly for little cost. Android is still well behind Apple in terms of stability, usability, consistency, etc. Yes, they have many more features, but those features came at the cost of consistency and design; something Apple never loses focus of. As a result, you get a great notification system with a poor attempt at a music/video player. It just feels too quirky at times..so much to the point that Samsung, HTC, etc all create custom themes to better manage it. That only leads to being behind by 1 or 2 releases while they attempt to bring their software stack up to the fast development pace of Android.
(more…)

1

Original Syntax Highlighter

August 22, 2011

All of our IDEs and text editors support syntax highlighting…however, here is the original highlighter before the invention of computers :) Does anyone remember these things? Next time you are writing pseudo code on your napkin or paper, break out one of these babies and make sure to use the proper color…you know, blue for variables, black for operations, red for functions…or was it yellow for operations, green for operations…all up to you I guess. Enjoy your multi-colored, syntax highlighting aware, pseudo-code creating pen!

0

Google+ vs Facebook and Twitter: My Personal Thoughts

August 12, 2011

For anyone who knows me personally, you most likely know that I despise Facebook and for plenty of reasons, most of which I consider valid (although some are just my personal annoyances). I’m also not an avid Twitter user, although I do use it to post my blog articles and share technology tidbits. However, I have completely bought into Google+, though I do know there are several issues there as well…some contradictory to my own opinions, but I’ll take the pros over the cons. Anyways, back to the topic: Why Google+ over Facebook?
(more…)

0

Easy REST: Groovy, Grails, and JAXRS

August 8, 2011

I needed an easy way to get an API up and running for a project that exposed JMX as an API (in order to easily interoperate with non-Java clients [ie: iOS…more details coming]). There are a variety of tools, resources, languages, etc to do this, but the one that I found easiest was via Grails using a JAXRS plugin which is a Java-based standard for RESTful services.
(more…)

3

OS X Lion: New Scrolling Behavior

July 20, 2011

It is only day 1, but so far, I’m already getting quickly annoyed by the new scrolling behavior…almost to the point I want to switch it back to the previous method. For those who do not know yet, Apple, in the latest version of Mac OS X (Lion), in order to more closely align with iOS, switched the handling of two-finger scrolling behavior. In iOS, dragging your fingers from bottom to top scrolls down. In previous versions of OS X, two finger dragging on the track pad from bottom to top would scroll up. This behavior is now switched, so that bottom to top scrolls down. The same holds true for right/left. I’m going to give it the time to get used to it, but so far not so good.

I’m not sure the new method makes entire sense though. (more…)

0