Showing posts with label Tech. Show all posts
Showing posts with label Tech. Show all posts

Monday, March 1, 2010

Intel VTune tools are broken on Windows 7 64-bit

If you want to profile C++ executables on Windows 7 64-bit with an Intel CPU, don't bother downloading Intel VTune or Intel Thread Checker or Intel Profiler (AFAIK, all the same thing) - they all crash as of these versions:

"Intel(R) VTune(TM) Performance Analyzer 9.1 Build:385" and
"Intel® Thread Profiler 3.1 Build:0.27583"

...with this uninformative error message:

SERA_Set_Platform_environment() Failed

For those like me having the same problems who are still looking for a free profiler that works and can't wait for Intel to fix VTune, check out AMD's CodeAnalyst.

And yes, the time-based profiling for this AMD product works for an Intel CPU (i5 in my case) on Windows 7 64-bit as I've just confirmed... and the download size is a fraction of VTune. You can also see this blog post if you don't believe me!

In CodeAnalyst, you can get functions level percentage by clicking your application process cpu usage bar in the system graph - it will then open a separate tab with function level samples.

Interesting that the trial software from a big company like Intel doesn't work as well as a free (as in beer) software from a company one tenth the size. The fact that Microsoft can't be bothered to provide such a basic development functionality except in their very costly Visual C++ premium edition is unforgivable... Doesn't Microsoft want to show off the fastest apps on their platform?

Note also how much of a pain and expenses are involved in profiling on win32 compared to apt-get'ing gprof and running that on any Linux box!

It's frustrating to have to go through registration screens, Internet Explorer specific sites and a few hundreds megabytes download to discover these facts...

Tuesday, February 23, 2010

Need privacy? Use Enigmail!

  • Do you want to send love letters that only your spouse should be able to read?
  • Do you want to make sure that emails you received are indeed sent by the person it is supposed to come from (and not some impersonator)?
  • Do you want to store confidential information at an untrusted location (on a network drive for example) without anyone else having access to that information?
  • Do you want to exchange sensitive information such as passwords, personally identifying information or proprietary secrets?
  • Do you want to limit the ability of hostile party to impersonate you electronically?
...then you need PGP (Pretty Good Privacy)!

First, a quick explanation of why PGP encryption is so interesting:

PGP, based on principles of public-key crytography, is a way to hide messages using a private (or secret) "key". The "hidden" (or encrypted) message can only be then returned to its original form using the public key. The reverse is also true: a message transformed by the public key can only be read by the private key.

That has all sorts of really interesting and sophisticated applications but two stand out:

First, you can digitally sign data by encrypting the result of a computation uniquely representing the data with your private key. Since only the public key can open that result, this can be used to prove that the data received matches the data sent.

Second is to create and send a message that can only be read by the person receiving it by using that recipient public key.

An email client to securely exchange email is a great start to add more privacy to your life. Best way to go about sending encrypted email is a combination of the following set of software, all OpenSource, free and cross-platform:
There are other tools, such as gpg4win, that will give you additional feature but they all use GnuPG.

BTW, on Windows installing gpg4win also installs GnuPG. The equivalent on Mac is MacPG. On Linux, these tools are generally all part of the distribution (look for Seahorse on Gnome for example).

Also note that Enigmail can be installed from inside Thunderbird by using Tools > Addons.

I'd also like to add that configuring Thunderbird 3 with Gmail is actually very easy; as soon as you enter your email as being @gmail.com, it sets the correct settings. In addition, everything is kept on the gmail IMAP server.

The Enigmail documentation is very good (better than what I wrote above!) and has an example that you can practice with.

Don't forget that when you send an email out you want to encrypt it with your recipient public key so that he can read the message.

When sending an email to someone that has a public key, make sure you've correctly imported the person's key here:

OpenPGP > Key Management > Display All Keys by Default

You can retrieve keys through the key servers:

OpenPGP > Key Management > Key server > Search for keys

However, make sure you exchange and verify the fingerprint for your keys through a secure channel to ensure you've got the correct key!

I would also recommend change the setting to use email addresses to decide intelligently which key to use (just make sure you verify that the key fingerprints you import indeed match the peer they are supposed to represent!)

OpenPGP > Preferences > Key selection > By email addresses

In Thunderbird, don't forget to save your drafts locally, and not on the server, otherwise there is a danger you would store your sensitive message as clear-text in the cloud:

Tools > Account Settings > Copies & Folders > Keep message drafts

I would also suggest disabling automatic decryption as you don't want to accidentally have someone see your encrypted emails over your shoulder:

OpenPGP > Automatically Decrypt/Verify messages

Use the menu option instead:

OpenPGP > Decrypt/Verify

A few things to remember:
  • be generous with your public key; you can and want to share it with everyone and distribute it through any public servers
  • be very protective of your private key: although this is itself encrypted with a key phrase, losing or exposing it to untrusted software should be prevented
  • don't lose it: your public/private key pair should become a way to enforce your identity
  • one weak point in all this is the software you use to manage and use your keys; be sure you trust the source and where you got it from!
Some settings that might satiate your extra paranoia:

Don't store emails locally where they are vulnerable to getting stolen:

File > Offline > Offline Settings > Message Synchronizing

Don't send emails with subjects:

OpenPGP > Preferences > Sending > Don't warn about subject line

Don't add more information on your setup than you should:

OpenPGP > Preferences > Advanced > Add Enigmail comment in OpenPGP signature

Use the Web of Trust (key signing parties!) by unchecking:

OpenPGP > Preferences > Sending > Always trust people's key



Saturday, February 6, 2010

TechRepublic is spammy

For some reason unrelated to newsletters, I opened an account with TechRepublic.

Two weeks later, this is what my spam-catcher inbox looked like (and note that the whole list does not fit on the screen!):



The number of email that site sent me far exceeded any other email sender (including the prolific local wine store). I'm having an hard time believing that anyone wants so much email from one site! I guess they haven't heard of "information overload".

And of course, when you do try to reach them through their email contact, they pop up a form to protect their own email...

I unsubscribed to all - hopefully they'll respect my wish.

Sunday, January 24, 2010

SACK not necessarily a good thing

Having fun testing large data transfers between Mac OS X, Linux 2.6 and Win7 machines.

I was getting very low transfer rate between the Win7 and Linux boxes (12 Mb/s) versus 92 Mb/s for other combinations.

This setting fixed it:

/sbin/sysctl -w net.ipv4.tcp_sack=0

From: http://datatag.web.cern.ch/datatag/howto/tcp.html

SACKs (Selective Acknowledgments) are an optimisation to TCP which in normal scenarios improves considerably performance. In Gigabit networks with no traffic competition these have the opposite effect.
But now, I have to figure out why I'm getting less than 100mb/s>

Saturday, January 23, 2010

Remote ssh connections, No buffer space

While testing the wonderful UDT, I had the following problems on Mac OS X:

#1

ssh connection being denied (even if Preferences > Share > Remote Login was enabled).

It appears that the UI configuration tool is broken and doesn't allow sshd-key-agent.

Change Preferences > Security radio button to Allow some connection. You should then be prompted for sshd-key-agent.

#2

While starting the client app that creates rather large buffer and UDP packet, I got the following:

$ ./appclient 192.168.0.195 9000
connect: Connection setup failure: unable to create/configure UDP socket: No buffer space available.

This can be solved with:

$ sudo sysctl -w kern.ipc.maxsockbuf=80000000
kern.ipc.maxsockbuf: 8388608 -> 80000000

Monday, December 7, 2009

Peugeot BB1

Comme un Smart, mais pour 4 personnes!

Sunday, December 6, 2009

Wednesday, August 5, 2009

Eclipse 6 year old feature request for word wrap

(Eclipse is an Integrated Development Environment for Java development that I've used and I'm using)

[misc] Text Viewer and Editor needs to support word wrap

...with one valiant attempt from Ahti Kitsik through Google Summer of Code but with no completed results and the following proposal:
Companies who are interested in sponsoring word wrap implementation with some cash -- please contact me directly ahti@codehoop.com for more details. It would be all-or-nothing deal -- sponsorship would be collected only after feature gets into platform codebase. I'd be happy to come up with a more complete solution if platform team is ready to introduce required API changes and we get enough interest from other companies too. I'm pretty familiar with the codebase and related problems (at least I was ~2 years ago).

Sunday, August 2, 2009

MV: the start of Silicon Valley

Sign on San Antonio road next to the shopping mall.

Site of first silicon device and research manufacturing company in Silicon Valley. The research conducted here led to the development of the Silicon Valley. 1956
The old building now houses a mexican grocery.

Friday, July 24, 2009

Social network "viruses"

From a friend:
Beware Netlog !!

I strongly suggest that you NOT click on anyone's Netlog sight should one come across your computer screen!! Through some highly deceptive ploy on their part, it will sign you up to join (even though you have not officially done so), and the result will be that your e-mail address book has been opened up and quite literally tapped into. Everyone in your e-mail address list will receive an "invitation" to look at your sight, thus setting off a chain reaction that taps into YOUR address book!!

Monday, July 13, 2009

An inspiring women: Mary Lou Jepsen

http://www.time.com/time/specials/2007/article/0,28804,1733748_1733754_1736211,00.html?iid=chix-sphere

Jepsen is a veteran of the MIT Media Lab, where she co-created the world's first holographic video system in 1989—back when computer imaging meant straight lines on a cathode screen. In 2005 Jepsen and Media Lab founder Nicholas Negroponte launched the nonprofit, open-source One Laptop Per Child program, which, as the name suggests, was an attempt to get a computer to every child in the world who needs one. The machines would have to work in extreme climate, amid spotty power and Internet connectivity, and be readable in direct sunlight.

[...]

Within two years they succeeded, creating a computer that can run on solar power, with five times the screen resolution of other laptops and a wireless system that creates its own network. The $100 price point has not been met, but $188 has. Jepsen did all that 12 years after receiving a diagnosis of a brain tumor in 1995 that had gone undetected for five years. She beat the disease but must take a dozen pills every day to keep her hormone output stable. Something of a self-taught expert on hormones, she now offers her insights to others who are diagnosed with the same illness. Jepsen is known among her friends as the "light lady" for her work with computer imaging. But the kind of light she's shedding goes far beyond the screen.

Friday, June 26, 2009

Typing it old skool

My birthday gift from Matt: a "new" IBM Type M keyboard from the original mold but with a USB interface! Love the taka taka taka of the hard springs inside - reminds me of programming on an IBM PS/2!

Min Lin however is not so happy with the noise... Mouahaha

I'll have to bring it at work to try it out on my colleagues!

Thursday, June 25, 2009

HTC Hero - First Look

Taiwanese (HTC) are really good at making lickable user interfaces for mobile phone ;-)

Sunday, June 21, 2009

Mac Book Pro, Mac OS X 10.5.7 crashes and Ubuntu 9.04

UPDATE: After a little bit of research, I found this:

http://www.pjentrepreneur.com/2009/01/21/update-mac-book-pro-blank-screen-problem/

I've had a Mac Book Pro air laptop since June 2007, one of the 3,1 model.

Model Name: MacBook Pro
Model Identifier: MacBookPro3,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2.2 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache: 4 MB
Memory: 2 GB
Bus Speed: 800 MHz
Boot ROM Version: MBP31.0070.B07
SMC Version (system): 1.16f11
Serial Number (system): W8722D1NX91
Sudden Motion Sensor:
State: Enabled

My experience with it has been relatively good and I've been happy with an OS that straddles ease of use with the power of Unix under the hood. I spend hours every day at the computer (probably around 3000 hours on this one since I've bought it) so it is important that it works and although I love figuring out stuff at work I want my computer at home to help me relax.

Since the update to Mac OS X 10.5.7, my computer has been acting up in weird ways. Of course, I'm all out of luck since I did not renew my warranty. I'm not the only one as Min Lin had to change her hard drive for another one when the SMART monitoring started indicating imminent failures. Luckily that was pretty cheap to do in Taiwan.

I've always had display problems of some kind in previous releases. I have a dual-monitor setup (MBP 15 inch display with a Dell 2405FPW 24 inch display) and sometimes one of the display would start flickering for a while, or one of the display would not come back from sleep (with Detect displays resolving that issue) or...

But with the latest update, this went from annoying to disastrous. The OS' WindowServer (equivalent to Xserver) will completely freeze (not even a killall -HUP WindowServer from an ssh shell will recover it) with very abstract artwork being displayed. Using Skype now is a guaranteed crash.

I call this one "windows in the snow"

What is more annoying is that at reboot the boot up process will eventually crash indicating that you need to reboot once again (and again, and again...). The only way to recover from this one seemed to be to boot in single user (Cmd-S at boot) and run a fsck -fy that would ALWAYS find that /var/run/pcscd.pub (incorrect block count for the file pcscd.pub (should be 16 instead of 17). "pcscd is the Unix daemon that handles smartcards for OS X so this appears to be due to some built-in problem in the OS where that particular process file is always open.

I've been researching these issues, but opposite to certainly Linux and sometimes Windows, Mac OS X users are proud of being able to be generally ignorant of anything "technical" and so when confronted with an actual problem they are less than helpful at describing bugs and resolving them instead of just blindly trying things. Apple's help is similarly suited to users that don't know much so you are pretty much stuck figuring the issue yourself. Not only that, but I've read in some places that Apple was aware and may be working at solving these issues but they haven't and will not say anything publically.

From what I gleaned, all this seems to be due to a long present issue with the NVidia GeForce 8600M GT and similar video cards - an actual firmware bug that from release to release gets worked around differently. So under that nice aluminium casing there is actually a lemon! Of course, they probably have/had code to work around the issue which explains the generally satisfying experience but as the OS code evolves so do regressions appear making using Mac OS X on this defective hardware unsustainable in the long term. Which is really sad because when you invest 2K$ in a computer you expect it to last for more than 2 years... Any other company would see itself a subject of a class action suit, but of course fans of Apple are generally more fanatic and can afford to swap a lemon after a while....

So just for kick, I've downloaded Linux Ubuntu Jaunty Jackalope (Jalopy!) 9.04 LiveCD. Surprisingly, this boots and works straight up from the CD-ROM. Surprising since the last time I looked into it you had to jump through all kind of hoops to get it to run on the special EFI architecture that the MacBook have.

Ubuntu has its own problems of course and some of those issues that have been known for a long time (such as the inability to drive the Dell 2405FPW higher than 1280x1024 when it is a 1920x1200 display), the very jumpy touchpad that I had to disable or other subtle user interface bugs (such as an invisible force field that prevents dragging windows from one display to the other). These of course will just get ignored if I report them as they are always working on the next generation instead - most of my bugs related to Linux distros have been closed in the past as deprecated in new releases even when they are very easy to reproduce.

But at least I get hope that it is possible to run this hardware without crashing all the times. It also seems to strangely help with resetting whatever issue is occuring on the Mac OS X side...

Friday, June 19, 2009

Comparaison d'engins de recherche

"BlindSearch" permet de faire une comparaison entre plusieurs engins de recherche sans etre biaise par nos preconceptions.

Si vous trouvez des mots-cles qui donnent les meilleurs resultats que celui de notre compagnie, n'hesitez pas a me les envoyer avec une explication du pourquoi un est meilleur que l'autre!

Friday, June 12, 2009

Artisan Wine Depot

Dégustation de bières avec quelques bières Allemandes et Belges au nouveau Artisan Wine Depot à Mountain View.

Nous avons rencontré un des cofondateurs de Eye-Fi (carte SD avec transmetter WiFi!) Ziv Gellat qui a démontré son produit en prenant des excellentes photos de nous:

DSC_3687.JPG

DSC_3725.JPG

Tuesday, June 2, 2009

Picnick online photo editing

I found a pretty cool online photo editing tool called Picnik, it's free and fun!

Before adding effects:


After adding some effects:

You can also create photo collage:

The free version has limited choices of effects and collage templates. It is possible to upgrade to Premium edition by paying an annual fee...

Saturday, May 30, 2009

Qu'est-ce qu'un BBS?

Hier, j'ai été obligé d'expliquer à mes collègues de travail c'était quoi un BBS (Bulletin Board System)!

Ils étaient complètement étonnés d'entendre qu'il y avait dans les années 80 et jusqu'au milieu des années 1990 des (centaines dans la région de Montréal) ordinateurs connectés à une banque de modems (4-32) auxquels les utilisateurs se connectaient de la maison. Ils étaient aussi sceptiques d'entendre que ces BBS offraient des services de forums de discussions, de téléchargement de fichiers, de jeux et de chats avec des limites de temps (1 heure) enfin que plusieurs personnes puissent se connecter à tour de rôle.

Un des deux, un nouveau stagiaire d'origine Chinoise avait entendu parlé du terme BBS en Chine à son université - mais pour lui c'était un serveur un Internet auxquel les étudiants se connectaient pour échanger.

Je pense que je suis trop vieux... Moi et Min Lin on a commencé notre relation sur le babillard électronique du Cégep du Vieux Montréal. J'étais aussi un sysop (system operator) du système et j'en profitait pour donner du temps d'extra à ma blonde ;-).

Friday, May 29, 2009

My Tracks Taiwan

Android My Tracks recorded GPS information for our Taiwan trip:


View Tracks: Taiwan May 2009 in a larger map

Friday, May 15, 2009

Google on the road

[This is in no way official or approved by my employer].

I'm biased but Google online apps and the HTC/T-Mobile/Google G1 running the Android stack (with Linux OS) have been very useful on this trip. Any wireless access point as provided in most hotels (and even in the Green Island B&B!) turns the G1 in a portable computer.

The qwerty keyboard makes blogging and sending out emails practical at a reasonable speed that would not be possible with an onscreen keyboard. Writing these blog posts to share our trip with you is an activity I like to do while waiting for Min Lin to finish up whatever she is doing or waiting for meals.

I found the best way to blog on the road is to use the blogspot email-to-blog functionality. Using drafts on the Android email clients makes it possible to write my thoughts and observations offline to queue them for sending the next time I have net access.

The pictures taken with the built-in camera are low quality which makes them perfect as a preview to the pics taken with my "real" digicam. Email pics attachments to the email to blog are automatically converted. This is an awesome feature which is actually a lot easier than creating a blog post, transferring pics and uploading them.

Since we did not make reservations ahead, Min Lin researched and made reservations on the road and even paid for rooms on secure sites.

Of course, Google search engine has been useful to look things like "jellyfish sting taiwan" to figure out if I was going to die or not.

Some Android apps are awesomely useful too on a trip. I've fallen in love with My Tracks, which uses the built-in GPS (yes, a real GPS!) to record any kind of travel from hiking to train rides. It provides statistics (such as average speed and moving average speed), elevation profile and of course the recorded path on a map. You can also share the tracks, although that doesn't currently work with the OS version I have installed.

There is also the Sky Map application that uses the GPS, compass and accelerometer to show celestial bodies and constellations names. Hold it up at night with a starry sky in the background and you can finally put a name on those shiny things in the sky!

The future is here and it's useful! I think that there is a lot of potential here.