What is a Widget?

I’ve had widgets on my mind lately.

Following definition via Wikipedia

A web widget is a portable chunk of code that can be installed and executed within any separate HTML-based web page by an end user without requiring additional compilation. They are derived from the idea of code reuse.
Other terms used to describe web widgets include: gadget, badge,
module, capsule, snippet, mini and flake. Web widgets often but not
always use DHTML, JavaScript, or Adobe Flash.

Widgets are a big part of what we do here. We have our widget gallery where people can grab and customize widgets that display everything from their own Amazon wishlist to New York Times bestsellers, to the featured stocks from Wallstrip. People can also use our BlueOrganizer Firefox add-on to create custom widgets containing whatever books, music, movies, and more that they’d like.

What this leads me to think is that whether we call these things “widgets” or something else is not important. It does not matter what we call them, it matters what they do and how they do it. If people can easily showcase what they are interested in and find important, then you can call it whatever you want. Or to paraphrase Shakespeare:

“What’s in a name? That which we call a widget, by any other name would still be installed and executed within any separate HTML-based web page and express the interests of that page’s author.”

Software Engineering Tips for Startups


Software is at the very heart of any modern startup.

The business ideas, new utilities for society and the next big thing all boil down to code. If the code is good, the startup has a chance. If the code is bad, no matter how brilliant the business people are the startup is not going to get far.

1. Must have code

se_code.jpg The working code proves that the system is possible, it also proves that the team can build the system. The working code is the launchpad for the business. After it is ready, the business can happen.

In the old days, tech companies were funded based on the idea written on a piece of paper. Those days are long gone. Today a startup needs to have not only working code, but an assembled system and active users. Software Engineering transitioned from the post funding exercise to the means to being funding.

Software now needs to be built faster and more correctly. It needs to constantly change to address the changing nature of the market and meet customer demands. Fundamentally, software engineering in startups is now a different game.

The working system is what gets you in.

2. Must have a technical co-founder

tech_se.pngAny startup starts with the idea and just a few people. A lot of startup co-founders these days are techies, passionate about technology and life. It was not always like that. Just a few years back a purely technical founding team would have had a hard time fund raising because there was a school of thought that you need an MBA to run the company.

In fact, a lot of the reverse was true. A few business people would get together, come up with the idea for a product and then think: Where can we get a techie to get this done?

It is misguided notion that business and technology are somehow separate and that the first one is the king while the second is marginal. It is not, because technology is what makes the business possible to begin with.

So the first tip is to always have a strong technical co-founder. Someone who shares or invents the business along with others, but also has the technical feet on the ground. Someone who can make sure the business is mapped onto technology correctly.

3. Hire A+ engineers who love coding

passion_se.png The software industry survived close to 30 years of crisis. Until recently, building a large scale system that worked was black magic. Most software projects suffered for years, had large engineering teams and little consensus on what needed to be done and how to accomplish it. The resulting systems were buggy, unstable, hard to maintain and extend.

The problem was that there were just too many people who were not that good who were working on the problem.

Startups can not afford to have less than A+ engineers. In a larger company there is an opportunity to mentor and grow people. In a startup every hour is precious. Not much time can be spent teaching people, you need to get people who know what they are doing.

Qualifications for A+ engineers are:

  • Focused on results
  • Loves coding and fluent at it
  • Writes elegant quick code
  • Smart and quick
  • Loves refactoring
  • Values testing
  • Solid in Computer Science

4. Keep the engineering team small and do not outsource

david_goliath_se.jpgA team of 2-3 rock star engineers can build pretty much any system because they are people who are good, love building software, focus on the goal and don’t get in each other’s way. The team of 20 so-so engineers will not get far.

The mythical man-month book debunked the notion of scaling by adding more programmers to the project. The truth is that most successful software today is built by just a handful of good engineers. Less is more applies equally to code and the number of people working on it.

Once you embrace the idea of just a few rock star people building the system, then outsourcing development becomes a really bad thing to do. Tech is your bread and butter, why would you outsource it? There are not many things more important than your code. Trusting people you never met to build the very foundation of your company does not make sense.

Again, it is a myth that you can scale faster with more programmers. It is even a bigger myth that outsiders can get your work done for you. This is not the place to save money. Hire a few of the best guns you can find, pay them well, give them stock options, make them happy and jazz them up about the company.

5. Ask tough questions during the interview

tq_se.png There is nothing worse than being soft during the interview and getting the wrong person into the company. This is bad for you, but more importantly bad for the person. In the end you will end up parting ways, but it would be best to just not make this mistake to begin with. So be tough and ask a lot of technical questions during the interview. What to ask depends on what you are looking for, but here are the basics:

  • Ask standard computer science questions: data structures and algorithms. (If the person does not know what a Hashtable is or how it works or how to write one - thats a big red flag)
  • Get a feel for knowledge of the language: It does not matter what language they claim fluency in - confirm it by asking specific questions
  • Senior people need to know threads, queuing, distributed systems, databases
  • Senior people need to know design patterns
  • Senior people need to know unit testing inside out
  • Most importantly, the candidates need to demonstrate love for simple and elegant code

Always ask for code samples - a lot can be revealed. Give written timed tests, even if its over the web. And always check references before making an offer.

6. Avoid hiring managers

mgr_se.png You do not need these type of people in a small team. If everyone is sharp, knows what they are doing and executes on a task, why do you need a manager? People who try to overlay complex processes on top your objectives are going to slow you down and make you frustrated.

If during the interview someone who has been a manager says “I miss coding and want to code again”, beware that soon they might want to go back to management. Point being - the best startup engineers are people who are young and hungry to write code. More experienced people who are looking to do more management than coding will not be as passionate. And this is bad, because startups need passion and drive to build the impossible.

What you need are experienced technical people who love coding. These are going to be natural mentors for your younger engineers. Mentors and not managers.

7. Instill an agile culture


Modern startups need to move very quickly. There is no room to plan for 6 months and then execute because someone else will get there first. The new approach is to evolve the system. Of course you are doing planning for the release, but you are iterating quickly, doing frequent builds and constantly making changes.

Coding becomes sculpting. Starting with a shapeless form you continuously refine the code to satisfy the business requirements and make sure that the system is designed and implemented correctly. This is agile culture which values:

  • Clean and elegant code
  • Continuous refactoring
  • Focus on defect-free software
  • Code ownership and pride
  • Team work and little ego
  • Most importantly: use common sense

8. Do not re-invent the wheel

bb_se.JPG
A lot of startups go overboard with the infrastructure. This includes two types of things - rebuilding the libraries and building your own world-class scaling. On the first point - there are so many fantastic open source libraries out there that it just does not make sense to write them in house. Whether you are using JavaScript or PHP or .NET or Python or Ruby likely there are major libraries that can help you. Re-writing existing libraries is a waste of your time and you are not likely to do it better.

Building a large-scale system is a different matter entirely. First you need to get to scale and then worry about it. The guys from 37Signals have written about this on many occasions including their Get real book. Why worry about having millions of users while you do not have any at all right now? Spending time making sure that you will scale big is a waste of your time. Focus on what your product does best instead.

And to that effect, we have been using Amazon Web Services and are now supporting > 1M BlueOrganizer downloads. The Simple Storage Service (S3) allowed us to build a truly distributed and scalable system. We have not started using EC2, Amazon’s compute cloud service, but are planning to re-evaluate it soon.

The point is that there are tools, solutions and services out there that can help you get to scale. It is better to use them than to spend huge amounts of time and energy and money on building these systems in house.

Wrap up

Software is critical to any modern business. So the key to success of any startup is to have rock star technical team that can quickly turn the vision into a piece of software and then evolve it and iterate it until it turns into a real business.

15 Tools to Help You Develop Faster Web Pages

1. YSlow for Firebug

YSlow for Firebug - Screenshot

YSlow grades a website’s performance based on the best practices for high performance web sites on the Yahoo! Developer Network. Each rule is given a letter grade (A through F) stating how you rank on certain aspects of front-end performance. It’s a simple tool for finding things you can work on such as reducing the number of HTTP request a web page makes, and compressing external JavaScript and CSS files. A worthwhile read is the Ajax performance analysis post on IBM developerWorks that outlines practical ways of using YSlow in your web applications.

2. Firebug

Firebug - Screen shot

Firebug is an essential browser-based web development tool for debugging, testing, and analyzing web pages. It has a powerful set of utilities to help you understand and dissect what’s going on. One of the many notable features is the Net (network”) tab where you can inspect HTML, CSS, XHR, JS components.

3. Fiddler 2

Fiddler 2 - Screen shot

Fiddler 2 is a browser-based HTTP debugging tool that helps you analyze incoming and outgoing traffic. It’s highly customizable and has countless of reporting and debugging features. Be sure to read the “Fiddler PowerToy - Part 2: HTTP Performance” guide on the MSDN which discusses functional uses of Fiddler including how to improve “first-visit” performance (i.e. unprimed cache), analyzing HTTP response headers, creating custom flags for potential performance problems and more.

4. Cuzillion

Cuzillion - Screen shot

Cuzillion is a cool tool to help you see how page components interact with each other. The goal here is to help you quickly rapidly check, test, and modify web pages before you finalize the structure. It can give you clues on potential trouble-spots or points of improvements. Cuzillion was created by Steve Saunders, the ex-Chief Performance at Yahoo!, a leading engineer for the development of Yahoo’s performance best practices, and creator of YSlow.

5. mon.itor.us

mon.itor.us - Screen shot

monitor.us is a free web-based service that grants you a suite of tools for monitoring performance, availability, and traffic statistics. You can establish your website’s response time and set up alerts for when a service becomes unavailable. You can also set-up weekly, automated benchmarks to see if changes you’ve made impact speed and performance either positively or negatively.

6. IBM Page Detailer

IBM Page Detailer - Screen shot

The IBM Page Detailer is a straightforward tool for letting you visualize web components as they’re being downloaded. It latches onto your browser, so all you have to do is navigate to the desired site with the IBM Page Detailer open. Clicking on a web page component opens a window with the relevant details associated with it. Whenever an event occurs (such as a script being executed), the tool opens a window with information about the processes.

7. Httperf

Httperf is an open-source tool for measuring HTTP server performance running on Linux. It’s an effective tool for benchmarking and creating workload simulations to see if you can handle high-level traffic and still maintain stability. You can also use it to figure out the maximum capacity of your server, gradually increasing the number of requests you make to test its threshold.

8. Pylot

Pylot - Screen shot

Pylot is an open-source performance and scalability testing tool. It uses HTTP load tests so that you can plan, benchmark, analyze and tweak performance. Pylot requires that you have Python installed on the server - but you don’t need to know the language, you use XML to create your testing scenarios.

9. PushToTest TestMaker

PushToTest TestMaker - Screen shot

PushToTest TestMaker is a free, open-source platform for testing scalability and performance of applications. It has an intuitive graphical user interface with visual reporting and analytical tools. It has a Resource Monitor feature to help you see CPU, memory, and network utilization during testing. The reporting features let you generate graphs or export data into a spreadsheet application for record-keeping or further statistics analysis.

10. Wbox HTTP testing tool

Wbox HTTP testing tool - Screen shot

Wbox is a simple, free HTTP testing software released under the GPL (v2). It supports Linux, Windows, and MacOS X systems. It works by making sequential requests at desired intervals for stress-testing. It has an HTTP compression command so that you can analyze data about your server’s file compression. If you’ve just set up a virtual domain, Wbox HTTP testing tool also comes with a command for you to test if everything’s in order before deployment.

11. WebLOAD

WebLOAD - Screen shot

WebLOAD is an open-source, professional grade stress/load testing suite for web applications. WebLOAD allows testers to perform scripts for load testing using JavaScript. It can gather live data for monitoring, recording, and analysis purposes, using client-side data to analyze performance. It’s not just a performance tool – it comes with authoring and debugging features built in.

12. DBMonster

DBMonster - Code Screen shot

DBMonster is an open-source application to help you tune database structures and table indexes, as well as conduct tests to determine performance under high database load. It’ll help you see how well your database/s will scale by using automated generation of test data. It supports many databases such as MySQL, PostgreSQL, Oracle, MSSQL and (probably) any database that supports the JDBC driver.

13. OctaGate SiteTimer

OctaGate SiteTimer - Screen shot

The OctaGate SiteTimer is a simple utility for determining the time it takes to download everything on a web page. It gives you a visualization of the duration of each state during the download process (initial request, connection, start of download, and end of download).

14. Web Page Analyzer

Web Page Analyzer - Screen shot

The Web Page Analyzer is an extremely simple, web-based test to help you gain information on web page performance. It gives you data about the total number of HTTP requests, total page weight, your objects’ sizes, and more. It tries to estimate the download time of your web page on different internet connections and it also enumerates each page object for you. At the end, it provides you with an analysis and recommendation of the web page tested – use your own judgment in interpreting the information.

15. Site-Perf.com

Site-Perf.com - Screen shot

Site-Perf.com is a free web-based service that gives you information about your site’s loading speed. With Site-Perf.com’s tool, you get real-time capturing of data. It can help you spot bottlenecks, find page errors, gather server data, and more - all without having to install an application or register for an account.

If you have a favorite web performance tool that wasn’t on the list, share it in the comments. Would also like to hear your experiences, tips, suggestions, and resources you use.

Reference: Six Revisions

What is REST?

Representational State Transfer (REST) is a software architectural style for distributed hypermedia systems like the world wide web. The best way to explain this, is an example. A REST application might define the following resources:

  • http://example.com/users/
  • http://example.com/users/{user} (one for each user)
  • http://example.com/findUserForm
  • http://example.com/locations/
  • http://example.com/locations/{location} (one for each location)
  • http://example.com/findLocationForm

This is a very, very short explanation of only a small part of what REST does. More information, as always, can be found on Wikipedia.

When you use custom URLs, you effectively hide some of your internal structure behind more meaningful URLs. This means you can refactor more easily without breaking external links or bookmarks to a specific part of your site. This is also important for search engine optimization.

Resources:

- Create RESTful URLs with Wicket
- Describe REST Web services with WSDL 2.0
- RESTful SOA using XML
- How I Explained REST to My Wife

CMMi, what is the real value-added?

CMMi Logo, DacTin.com

In Vietnam, until now, there are approximately 6 companies, mostly foreign-owned ones, having achieved CMM/CMMi appraisals with maturity level 3 or above, including:
- FCGV (PSV): CMMi v1.1, maturity level 5
- FPT Software: CMMi v1.1, maturity level 5
- Global Cybersoft Vietnam (GCS): CMMi v1.1, maturity level 4
- ELCA: CMMi v1.1, maturity level 3
- TMA Solutions: CMMi v1.1, maturity level 3, currently in the last stage to be appraised for level 4.
- Harvey Nash (Silkroad): CMM, maturity level 3

In addition, there are about 15 organisations implementing the model with maturity level 3 (if not level 4, such as Lac Viet corp.) at this point, and planned to be officially appraised in the first half of 2008.

However, it is easily observable that most of the organisations do not really emphasize on the values that CMMi and other standards/best practices, as the tools, could bring to business development objectives. Of the above companies, quite a few has actually investigated enough budget and effort to practically improve the process so that it will help increasing product quality and productivity attributes. Usually is the target set just to get certificate papers first, as a strategic marketing/ advertising methodology, for which could bring negative effects when the outcomes do not actually meet customers’ quality expectations at the end.

What I want to say is, in fact, what the software outsourcing companies are doing is just not right. To compete against the competitors (in India, China, Phillipine, etc.), while not having any outstanding competencies at all and still getting customers in a very passive way which is unpredictable, incontrollable, and quite risky, trying to get the certificates by any cost is just to put ourselves into higher risky status. Why don’t we just find a way to improve real beneficial process first? Why couldn’t we have a good vision from the very early stage to identify our strengths over them? Why must we have quick fixes while we all know quick fixes always cause side effects?

May you the only one who can find the answer…

Resources: Dac Tin’s blog

Use your time wisely

Most people complain that they never have enough time to take action on their goals. All they can think about, after work, is to watch TV, relax, and sleep because they feel so tired. I was the same. I have never considered the importance of time before. I would just laze around, watch TV, lie on bed, hang out with friends, chat, surf the web, and play computer games (or online games) whenever I have free time. And one day, I thought about the things that I have achieved. To my surprise, I haven’t accomplished a lot and I was moving too slowly.

Undoubtedly, time is the most valuable asset one may possess. Once you lose your money, you can always get it back later. However, it will just never happen the same with your time. Once lost, it will never be reclaimed. Unfortunately, you can barely manage time, save time nor make time. You can only use your time wisely.

There are many advice on effective time consuming already. In this blog entry, I would like to summarize a few and add some that really work with me.

1. Choose your ultimate goals.
You may be wondering why goals first - because it will help. Trust me, you will hardly work any faster or any harder than you would usually do, regardless how hard you try. However, with an ultimate goal defined, you would have your approach optimize, you would be able to eliminate redundant activities or those that bring no values to you. It’s never a waste to put some time on goal setting and planning.

2. Be organized.
Try to break down the activities needed to achieve your goal with PRIORITIES. Review your plans every day or week to optimize the schedule. Let’s put everything under control. I suggest to daily schedule what to do when you are riding to workplace, and review what has been done on the way to come back home.

3. Learn to say ‘NO’. Cut your losses.
Chat and internet surfing, watching TV, and playing games are the topmost time-wasting activities. Believe me! These will not bring much values as you might have thought.

It is a good idea to enforce you yourself to only chat, check personal e-mail and surf the web on non-work stuffs at lunch time only, in no longer than 45 minutes per day. Spending longer hours on chatting and sending personal e-mails will not actually help you obtain any more information. Alternatively, don’t read every single pieces of news but focus on what is really useful for your goals, your job, and your life. Try RSS Feeds, it will also help.

Watching TV is also a time-killer giant. Don’t waste your time on movies as you cannot learn anything much compare with the time it takes. Use that amount of time to read self-improvement books is much better. In addition to this, Cinemax, HBO, StarMovies, etc. don’t really help you improve your English because it’s hard NOT to focus on the Vietnamese subtitles, try Bloomberg, Discovery Channel, and National Geographic instead. NEVER let the contemporary damned low quality Vietnamese movies ever bother you, simply because it isn’t worth your time.

Don’t play computer games or any other games that bring no help. Play the real-life game instead, you will find it an even much more interesting game.

4. Repeat the above steps.

Because most of us rarely find and take time to organize the way of doing things in our everyday life, we’re constantly overwhelmed with tasks and things to keep track of. This gives us the impression of being so impossibly busy all the time, that we can’t imagine doing something else on top of our daily routine. We feel lucky if we get to enjoy a weekend with our family, yet we never stop worrying about all these things waiting for us back at work.

Every single of us has equally 24 hours per day, neither more nor less. Find your own way to use time wisely and you will be surprised on the returns.

List of Free Java Decompilers

List of all free downloadable decompilers for Java. They will convert class files back to readable initial Java source code.


DJ Java Decompiler

The aim of this project is to develope a decompiler for java which is platform independent and has options to obfuscate the class file also. The project takes class file as input and decompiles it and provides the source file.

NavExpress DJ Java Decompiler

With NavExpress DJ Java Decompiler you can decompile java CLASS files and save it in text or other format. It's simple and easy.

Mocha, the Java Decompiler

The distribution archive (file "mocha-b1.zip") may be distributed freely, provided its contents ("mocha.zip" and this file, "readme.txt") are not tampered with in any way.

JCavaj Java Decompiler

JCavaj Java Decompiler is a free Java-based Java Decompiler. It reconstructs the original source code from a compiled binary CLASS file. You can decompile java applets, jar and zip files producing accurate java source code.

HomeBrew Java Decompiler

Have you ever lost the source code to a Java program and thought there was no way to get your code back? Well fret no longer, HomeBrew Decompiler to the rescue! It's still far from perfect, but hopefully it will be able to provide enough for you to reconstruct your lost source file.

Home Page of Jad - the fast Java decompiler

Jad is free for non-commercial use, but since the version 1.5.6 it's no longer free for commercial use. This means that Jad cannot be included into software products (especially decompilers) without my prior permission

Dava: A tool-independent decompiler for Java

Dava is a decompiler for arbitrary Java bytecode. It can be used to decompile bytecode produced by Java compilers, compilers for other languages (AspectJ, SML, C) that generate Java bytecode and tools like Java bytecode obfuscators, instrumentors and optimizers.

Jdec: Java Decompiler

JREVERSEPRO is a Java Decompiler / Disassembler written entirely in Java. This reverse engineering utility is issued under the GNU GPL The utlimate objective of this project is to provide a decompiler that generates a Java object-based structure that can be programmatically inspected using a specific API.

Java Optimize and Decompile Environment (JODE)

JODE is a java package containing a decompiler and an optimizer for java. This package is freely available under the GNU GPL. The bytecode package and the core decompiler is now under GNU Lesser General Public License, so you can integrate it in your project.