Saturday, August 9, 2014

Alternatives to JAWR

I have used JAWR before, and found it to be pretty good. I'm now starting a greenfields project and wanted to know what alternatives exist.

Here is what I found:

Granule
Granule is an optimization solution for Java-based web applications (JSP, JSF, Grails). It combines and compresses JavaScript and CSS files into less granulated packages, increasing speed and saving bandwidth.

The granule solution includes:

  • JSP Tag library. You just need put the tag around your StyleSheets and JavaScripts to compress and combine them.
  • Ant task, to include pre-compressing in your build scripts.

Free and Open Source Java project which brings together almost all the modern web tools: JsHint, CssLint, JsMin, Google Closure compressor, YUI Compressor, UglifyJs, Dojo Shrinksafe, Css Variables Support, JSON Compression, Less, Sass, CoffeeScript and much more. In the same time, the aim is to keep it as simple as possible and as extensible as possible in order to be easily adapted to application specific needs.

Easily improve your web application loading time. Keep project web resources (js & css) well organized, merge & minify them at run-time (using a simple filter) or build-time (using maven plugin) and has a dozen of features you may find useful when dealing with web resources.

Full control of what you are doing when the other tools do not quite do what you want.


I decided to stick with JAWR because it seems to be the only one that can create sprites.

Thursday, April 26, 2012

You can't win the all features on time game

It's an interesting assertion that "You can't win the all features on time game".  Why can't it be won sometimes? I feel that developers are hard-coded to always want to negotiate on scope or timelines.  We always ask our project sponsors to prioritize the work.  Why can't we ever look at a package of upcoming work, and just agree that it is possible to do it all in the available time?  Surely our project sponsors don't always ask for the impossible?  But no matter what they ask for we always seem to come back and ask for the work to be prioritised, and some items to be de-scoped or postponed.  Why do we do this?  Is it just habit? Or is it always impossible to deliver the whole scope on time?  Do we negotiate just to feel like we've had a little win?  Or is it to reduce the amount or work we need to do?

Sunday, February 5, 2012

Why do we put up with the inefficent system of state governments in Australia?

State governments are a terrible waste of money, considering how the same bureaucracy is repeated in every state and territory.  There is no good reason why every state needs to have it's own bureaucrats making policies for education, health, police, infrastructure etc.  This system results in the country's best policymaker influencing one state, and other more mediocre people making policies in all the other states.  If all the state governments' departments were closed down and everything was managed at the federal level, there would be more money available to hire better quality policymakers rather than a large number of average ones.

The needs of each state are not that different to justify separate departments.  Sure the states have different climates, a slightly different mix of races, and one or two words in their vocabularies that other states don't quite get, but there is no reason to have and entirely separate hierarchy managing the government services.

Centralising government services would allow greater specialisation of the policymakers.  Take for example one state the gets a lot of tropical rain (I'm looking at you Queensland!).  With state based departments, that state's infrastructure people would be experts in planning anti-flooding projects.  And all the other states wouldn't benefit from this expertise.  With centralised infrastructure function, the anti-flooding experts could apply their expertise to the whole country.

State and federal politicians spend a substantial amount of their time trying to shift blame to the other level, or screw the other level over.  If it were all managed at a federal level then there would be no opportunity for this political time wasting and ass covering.  There would be one department, run by one or more ministers from the same government.  The buck would stop there and only there.

Obviously we still need states as a geographical division, for the purpose of inter-state sport competitions etc, and they may be a logical way to manage some government services.  Just as a large company may have a manager for each state, but still be centrally controlled.

It's not just bureaucrats that demonstrate the inefficiencies of state governments.  There's also the problem that each state has subtle differences in their laws and regulations, which means a business operating in one state has to do a whole lot of compliance work to see how the different regulations in the new state might impact them.  The inconsistent laws also impact drivers who have to face subtly different road laws when driving interstate.  The state roads departments have done a fairly good job of making the laws consistent across states - but that just goes to demonstrate my point - there are departments working in each state, ALL DOING THE SAME THING.

I would like to see all responsibilities of the state governments gradually transitioned to the federal government over say 20 years, until state governments fade into history.  Let's get our politicians working for some serious positive change in our country.

Tuesday, December 27, 2011

Broken DVD burner in my Panasonic DMR-XW300

I have a Panasonic HDD/DVD recorder (DMR-XW300) connected to my TV.  It lets me record TV programs, and later burn them to DVD.  I've had it for about 3 years, and I've been very happy with it.  Its user interface is nicer than many similar recorders that were made after it.  Recently something has gone wrong with the DVD burner.  Whenever I close the DVD drawer the drive makes a grinding noise, and it the TV screen shows a message saying it cannot read the disc.  This even happens when there is no disc in the drawer.

I've been trying to decide what to do.  I see my options as:

  1. Replace it.
  2. Repair it myself.
  3. Get someone else to repair it.


I don't want to replace it, because it's working fine apart from the DVD drive, and I think that replacing the whole unit would be expensive, and there's a chance a new one would not be as user-friendly as my old one.

I've got some time on my hands (it's Christmas holidays at the moment) so I decided to try to repair it myself.  I did some research and found a guy on youtube who replaces the drive in a DVD player with one hand, while filming himself with the other hand and listening to blues.  If he can do it with one hand in a few minutes then surely I can do it too.

I took a screwdriver to the case and opened it up.  Unlike the guy on youtube, my recorder doesn't seem to have a generic IDE/PATA drive.  Instead it connects with some cabling and connections I've never seen before.  On top of the drive is printed VXY2012.  I found on Google that VXY2012 parts are supplied by PAVCSG, which is some division of Panasonic in Singapore.  So now I'm waiting to hear back from a Panasonic spare parts supplier to see whether I can get a replacement drive from them.

I'll post updates of how I go getting the replacement drive and installing it.

Sunday, August 7, 2011

What's the point of DevOps?

I work in a development team, and most of my colleagues are getting into DevOps.  But I don't understand all the fuss.  As far as I understand it, DevOps is about two things:
  1. There is a conflict between the need for stability and the need for change
  2. IT professionals don't communicate well
That's all it is to me.  Neither of these are ground-breaking revelations.  They have always been true and obvious facts.

I can't understand why we need to have a "movement" (whatever that means), about these two issues.  Sure, they are real issues that nearly all IT departments face, but to me they are not deserving of a conference, book or name that is a proper noun.

The solution to these issues doesn't require clubs and LinkedIn groups.  All we need is:

  1. Management to align every individual's KPI's with the organisation's true goals. (It doesn't work to have one department measured on the system's stability, while another is measured on how much change they can deliver.)  Just measure everyone on profit, or customer satisfaction, or whatever it is the organisation is really aiming for.
  2. Get all your team working in the same location.  How close is close enough? In my experience, if you have to walk through a door to get to someone then the collaboration will be sub-optimal.
  3. Get your teams to eat together, and every week or two give them some beer.

It's that simple.  Or maybe I'm just not getting to point of DevOps.

Sunday, June 26, 2011

Selling on Ebay: Twelve months on

There has been a lot of debate recently about how on-line retailers are hurting established retailers. My wife decided last year that she had had enough of her job so she quit and started trading on ebay. Twelve months later, and she is still trading, and I thought it would be a good opportunity to share what she (and I) have learnt.

Copyright
Not long after she started, she ordered a shipment of a popular brand of exercise DVDs. They looked completely legit (not pirated), and we were able to sell them a lot cheaper than the same brand in the major stores, and still with a large mark-up. Within hours of listing them we had sold at least 10 box sets, and we were already ordering more and planning how to spend the small fortune we were making. It was too good to be true. A day after we listed them, we got a blunt email from ebay, saying some lawyers from the copyright owner weren't happy, and our listing had been cancelled. I thought it was unfair, because I believed the DVDs were genuine, and even if they weren't, how could the copyright owners know from an ebay ad? But I did some research, and I found it is illegal to import any copyrighted material into Australia without the copyright owner's permission. So they had us on that even if the DVDs weren't pirated. So we ended up refunding our small fortune to the buyers, and dumping a load of DVDs at the tip. We never heard again from the lawyers :-). We're staying away from copyright items now.

Buyers
We have found that 99% of ebay buyers are great people, and when you communicate honestly with them they will really appreciate it, even after something has gone wrong. The other 1% threaten you before they've even paid for their item.

Freight
We always send our parcels with Australia Post, and rarely have any problems. Once we sent a kitchen utensil in an envelope, and the recipient received a note from Australia Post that the item had been destroyed because it got jammed in their sorting machine, and they said it was our fault for not packaging it correctly. Once the post office stamped over the address, and then the postman couldn't read it, so it got returned to us. But out of all the items we sent we've had a pretty good success rate.

Buying unique items to sell
I thought it would be a good idea to find stuff on ebay that is poorly advertised, and buy it with a low bid at auction, and then resell it at a higher price. It certainly is possible, but is time consuming, because you have to prepare an ad for each item, and the most you can sell of it is one. It is much more time efficient to have a small range of products, but buy them in bulk, because then you can write a small number of ads, and potentially sell a large number of items.

For example, we bought a bulk lot of assorted women's underwear, and it worked out to 50 cents a piece, and we were able to sell them for $5 a piece. It sounds great, but because each piece was unique we had to photograph every single one, and write a separate ad for every piece.

Buying in bulk
We have done most of our buying through two web-sites that connect suppliers in China with retailers. DHGate and AliExpress. We have checked the customs rules about importing, and found that no import duty is payable if you import goods worth less than $1000, so we always keep our purchases under that amount. Sometimes there is language difficulties with the suppliers, but if you keep your messages simple they usually understand. Keep in mind that if you ever have to ship something back to them (e.g if the order is wrong), it will cost a lot more than the cost of shipping to Australia.

I recommend stocking items worth between $50 and $200, because any less and you will not make enough to justify the time you spent advertising and sending it, and any more and your customers will ask a lot of questions, and expect support from you to use whatever it is you've sold them. I borrowed that pearl of wisdom from Tim Ferriss's book.

Ebay fees
Fees work out to be nearly 10% of every sale, when you count the listing fees, the PayPal fees and the final value fees.

Conclusion
Selling on ebay can vary from a hobby to a big business. The key success factors are having the confidence to seek out wholesalers and negotiate with them, choosing your stock carefully, and having the flair to write a good ad. It can be enjoyable and challenging or it can be a chore, it just depends whether you have a passion for that type of work.

Self-insuring for (financial) health


I've been thinking about my private health insurance, and whether it makes sense from a financial and risk management point of view, compared to self-insurance.

I am in my 20's, married, and hoping to start a family soon. I've had private health insurance my whole life; I was on my parents' policy until I moved out of their place, and on a policy with my wife for the last 5 years.

The reason I take out insurance is to mitigate risks that are too large for me to accept. I have house insurance because without it I could not afford to re-build if my house burnt down. I have car insurance because I couldn't afford the repairs if I smashed into a Mercedes. But I don't see any great risks in not having private health insurance.

I live in Australia where the government funded health system (Medicare) is mostly quite good. Medicare will cover the cost of nearly all urgent health care needs. I don't see any risk of relying on Medicare for urgent needs that might arise.

So what if something goes wrong that Medicare considers non-urgent? I've heard stories of people spending years on waiting lists with problems that seem pretty urgent to me. For example a lady who had a large hernia that prevented her from working had to wait years (according to a tabloid TV current affairs program). That is where I think self-insurance makes sense.

If I save say $60 per week, then I can draw on those savings in case my wife or I need some medical treatment that Medicare considers non-urgent. It's pretty much the same as having insurance, except there is no insurance company taking a cut, and if we don't claim, the money is still in our account.

I love the idea of being able to make an insurance “claim” that is as simple as transferring money from the account where I've been saving it. No filling out and posting forms, or dealing with call centres, or trying to work out whether I'm covered. I had a lot of difficulty a few years ago getting NIB to pay a claim for wisdom tooth extraction, because they said it was pre-existing.

There is a risk with self-insuring that my wife or I will need some treatment that Medicare considers non-urgent before I have saved enough to pay for it, but I think that risk is pretty small. At $50 per week I'll have over $3,120 plus interest saved in the first year, and being young-ish, I think it is unlikely my wife or I will need any treatment that is (1) non-urgent by Medicare's standards, (2) over $3K and (3) occurring in the next 12 months. And if we did I could take a loan. I think that risk's likelihood and impact are small enough to accept.

Unfortunately the government has laid down a few quirks to ensure it is not as simple as that:
  1. If you take out private health insurance, the government will pay 30% of the premium. There's no such rebate for people who self-insure – which seems unfair to me.
  2. If you don't take out private health insurance by the time you're aged 30, but take it out later in life, then you have to pay a higher premium than someone who's been covered since they were 30. (this is called lifetime loading)

Another quirk in the market is that private health insurance companies negotiate with private hospitals to get cheaper prices for insured patients than non-insured patients get charged.

All these factors seem like good reasons to have insurance.

What I would really like to see is an insurance company bring out a type of policy that combines the best of both worlds – you pay your premium to the insurance company, and they keep it in an account for you, and they accept any claims you make (there would be no list of exclusions), and the total value of claims would be limited to the total amount of premiums you have paid over the life of the policy. This way the policy would still attract the government rebate, and get the discounted prices at private hospitals, and avoid the lifetime loading. The insurance company could make money in two ways – by charging an excess on claims and/or by keeping the balance remaining in the policyholders' accounts when policyholders leave.

So my plan is to have a foot in both camps – I will keep my private health insurance, but at the lowest possible level, and self-insure for anything that isn't covered by it.

I'm interested to hear your thoughts, please leave a comment.