Tuesday, November 22, 2011

Things made of paper

In general there's nothing much to complain about here in the US. One thing that's crazy is the credit score system and how you fight to get a decent credit card... But that thing is messed up big time!

But there's one other thing that affects our everyday life much more, and the market is totally neglected by the available brands. And there's a European brand that could make a fortune here and could conquer the country in a week:

Americans can't get right only one thing and those are the hygienic products made of paper. Paper tissues can hardly be used even for once and you need to fold toilet papers at least six times so they don't puncture while you're wiping. There's only one product in each of the two category that is usable.

Paper tissues: Puffs Plus Lotion

But it only comes in a box, so if you caught a cold you need to carry the box with you. All the 10 piece small packages are useless. They get torn with one nose blow. This is the one and only thing that can survive you blowing your nose. And I think that would be the minimum requirement!

Toilet paper: Charmin Ultra Strong

And this thing is the one and only reliable brand available. The others you need to fold 6-8 times and nothing guarantees that your finger will not meet your anus accidentally.

I don't know why manufacturers here don't get this right. It ain't no rocket science!

So Zewa if you ever considered appearing in a new market, I can assure you that you can take the US by storm!

Saturday, November 19, 2011

DRM, why are you still here?

I've just discovered Spotify. Yepp, I'm slow. But I don't like the idea of paying for listening to music. I'm renting a jukebox for $9.99 a month... The good thing that it's not just streaming but with the premium account (the one you're paying for) you can save the songs on your hard drive, Android device, iPhone etc. So you can listen to them using the Spotify application on your device.

So these songs are saved on my storage device you say? I wanna have them! But oh no, they are encrypted!

While there're libraries to despotify them I'm not in the mood right now to set up a virtual box on my desktop machine running linux and compiling a bunch of C code and spend a day or two until I get my first DRM free OGG file out from Spotify.

Since I was born in the 80's I remember buying a new 90-120 min chrome tape every week, staying up late on Thursday (I think the show aired on Thursdays) to listen to Danubius, Radio 1 etc. and tape Hot Mix.

With DRM and modern technology we can go back to there somehow, the only difference is that our music never leaves the digital word, so I don't have to worry about amplifier or radio noise, tape noise (remember Dolby C?) etc. I could just set my Audacity to record from stereo mix and hit the record button and then hit the play button in the Spotify player. There's no high dubbing in this case, so yeah it takes the whole hour to record an album, and then I need to split it up and export as MP3 and I don't have ID3 tags yet, but I'd own the music.

And did I crack DRM? Yes and no. I didn't crack it, but it couldn't fulfill its destiny either. So why is this still around? Shouldn't artist just earn their money by touring? If you're good enough I want to see you live, too! And certain artists cannot give back the sound of their studio recorded songs live. Just remember the humiliating live appearance of Jamie Foxx and Will.I.Am on American Idol... Live performance will unveil if you're fake...

So a step by step guide (on Windows 7):
  1. Get Audacity and Spotify
  2. Search for the songs on Spotify and save the playlist and mark them as available offline
  3. The 'device' Stereo mix in your recording devices are not shown directly because it's disabled by default, so right click on the sound icon on the taskbar, select Recording devices. Right click anywhere in the window and select Show disabled devices, enable Stereo mix.
  4. Open Audacity, click on Edit/Preferences. Under Audio I/O, Recording select Stereo mix
  5. Left click on the sound icon on the taskbar, click mixer and mute all other applications except for Spotify
  6. Hit the record button in Audacity
  7. Hit the play button in Spotify
  8. Wait for your playlist to finish
  9. Stop recording in Audacity, click on the wave track, hit Ctrl+A, select Analyze/Silence finder
  10. Review the found silence labels, and you can replace the default 'S' with the song name
  11. Hit File/Export multiple and select MP3 as export format
  12. Fill out the ID3 tags as you want
  13. Done
DRM, you rock!

Tuesday, November 15, 2011

Java keystore issues

If you get a javax.net.ssl.SSLHandshakeException while trying to make a secure network connection (secure socket over SSL/SSH or HTTPS connection) is probably because of one the certs on the URL you're trying to hit is missing from your Java keystore. If you're doing development and you're hitting a development environment your problem is most likely due to a self signed certificate.

In these cases you need to use keytool to import this certificate.

Steps to perform:
  1. Invoke the URL using your browser and save the certs of all levels in DER format
  2. Save all these DER files somewhere
  3. Invoke keytool: keytool -importcert -alias <myalias> -file <path to my file>.der
So far it's a piece of cake, and if you're a somewhat experience Java engineer you most probably did these steps.

Now if you're working for a big company your whole development environment is well defined and most likely the Java version to use compiling your projects are also centrally controlled and you're not using the one that is installed on your workstation or laptop. What I've discovered that keytool doesn't really give a damn about your JAVA_HOME or path settings. Meaning it will choose a key store on your machine using a mysterious algorithm (aka. random) and it will never be the one you expect...

So you have to know where your key store is actually located. And that is your JAVA_HOME/jre/lib/security/cacerts file.

So in order to make keytool use the right key store the above mentioned command has to be altered accordingly:

keytool -importcert -alias <myalias> -file <path to my file>.der -keystore <JAVA_HOME>/jre/lib/security/cacerts

So now using the java under your JAVA_HOME will not cause any javax.net.ssl.SSLHandshakeException end you can live happily ever after!

Sunday, November 13, 2011

Working for a big company...

... is a whole different experience.

Working for a smaller company enables you to change your hats and learn things faster, since you have to, in order to survive. So your knowledge will be more diverse and broader. In return you have to sacrifice more of your personal life in favor for your job and because things around you are not that organized.

Working for a big company changes your whole life. I joined only 2 weeks ago, but I can already see the difference. There's an organization just for me, for the employee, so I can feel better, they take care of things for me, there's infrastructure, procedures. Cons are that you become one cog in the wheel, but that also enables you to deepen your knowledge. So your development is rather vertical than horizontal; you become a specialized professional; and that's also good.

I'm happy with my decision. I haven't done too much yet, because of the training and learning, but I don't have to check my mails on the phone in the evening, I can focus on my tasks and finish my assignments on time, plus I get all the support to learn. And the more I learn the better I can do my job.

To summarize here's what I think:
  • As a freshman it makes sense to join a smaller company. The pay is less, and there're sacrifices, but you will learn super fast and gain experience in many different but alike fields.
  • When you can count yourself as senior it makes sense to join a big company. One of your skill from the broad skill set you gained will be valuable for your corporation and gives you the opportunity to deepen that knowledge, and also give you everything to feel secure and have a balanced life.
  • Later when your children are more independent and you become bored probably makes sense to start your own business or go back to the start-up field as a manager/director and make use of the experience of an organized workplace and help by establishing something similar.

Riding the public transportation

Is actually not that bad. By car my commute is like 25 minutes. With the public transportation it is 30. Plus the 20 minute walk from my place to the train station (it takes 25 by bus, one line, no transfer, stops 3 mins from my home...). Plus the train comes like every hour or so; mornings and evenings probably like every 45 mins. The bus stops at my workplace. Comes every 30 mins. These are the factors that makes me not want to ride the train and bus. And even though my new place sponsors my passes, pub. trans. is like $25-30 less a month than gas for your car. But then i don't have to watch the time, nor do I need to wait for the train being late while it rains a little and the track gets slippery (otherwise why would it be late?).

So I understand that buses cannot come more often because there're not enough people riding them. And this is why the tickets cannot be cheaper either. But people will not switch to public transportation until gas prices don't force them. Catch 22.

I got my visa papers yesterday, so I'm going to the DMV tomorrow morning to get my driver's license back, and I will drive my car to work.

In Europe gas is twice that expensive, monthly pass in a fairly sized city is around $70-150, cities are cities and not over-sized villages, so everything is closer to each other, there's sidewalk, bus comes every 5-10 mins, and I don't have to walk more then 10 mins to the nearest station. Plus gas prices make me consider every small trip I plan using my car...

Here public transportation will never be successful while people can afford using their cars. Even carpooling is a better option right now. And you cannot change the settlement patterns. Americans want to live in houses and they're ready to commute 30-50 minutes by car because of the backyard they want.