Page 2 of 3

Tips to Strong Passwords for Improved Privacy

LockMany people think the strongest passwords are those made of special/foreign characters such as É, &, * or ¿. A password looking like g&J2!3aQ must be pretty strong right? What about taking a dictionary word, and replacing letters with numbers, for example, 0r4ng3? Well, these two examples aren’t THAT strong.

For a human being without automated tools, the first one is kinda hard to break, and the second one is a bit easier. For a specialized bot though, it’s almost as easy as breaking 87654321. Many algorithms exist to help dishonest people break into your email, bank Web access, or social media accounts. I’m sure all of you will want to prevent that. Following are my personal advices for safer passwords (or pass phrases). Some are based on computer science facts, and others on real experiences from friends, and myself. They can’t be taken as the ultimate truth, but will help you achieve better safety for your multiple on-line accounts.

Don’t use the same password twice

Imagine you are on a public computer signing in to some irrelevant website, let’s say to leave a comment on a forum, and someone sees what you are typing: your email address (which is often used as username), and your password. He can now access your email account if it is protected by the same password. From there, he can do almost anything because he’ll be able to use the “retrieve your password” feature of all other websites you have an account on.

Prefer a long phrase to a complicated short password

As illustrated in this image, the longer the password, the better. More than that, you can choose it so it’s easier for you to remember. “I lost my favorite green shoe” (if it means something to you), is much easier to remember than uJ@ggC9K!.

Some miscellaneous tips for short passwords

If a site limits you to a short password (10 or 12 characters for example), here are some easy tips you can follow :

  • Don’t use dictionary words or people/place names, even with numbers at the beginning or end, this is the first thing password crackers will try
  • Same thing with replacing letters with “matching” numbers: m4st3r, those are broken easily
  • Find something easy to remember so you don’t have to write it down, for example : 1994 with “turtles” (the year you bought your favorite turtles): 1tURt99Les4
  • You might wanna use a more complex combination of uppercase and lowercase letters, and also numbers to make it hard to break for humans

Don’t change your password for no reason

If your account hasn’t been compromised, and if you don’t have a good reason to change your password, don’t change it. You risk forgetting it or maybe not choosing a password as strong as your first one. Remember, it hasn’t been cracked yet! 😉

Please, I’m sure some of you readers will have more tips, and maybe discredit mine, who knows. Feel free to leave your comments.

Free Unity 3 “basic” License

Last year I talked a bit about some of my augmented reality projects. Many of you have sent questions and posted comments so I suppose there is a certain level of interest in that field. One of the conclusions I had back then was that to achieve a certain level of quality (great lighting effects, surface reflection, etc.) when rendering a 3D model in an augmented reality project, you better use a good 3D engine (such as Unity). I still think this is true.

Yesterday I “discovered” that Unity is offering its iOS and Android “basic” license for free until April 8th. Normally, you’d have to pay $400 for each of them. So if you were unsure Unity was a good choice for your project of not, go ahead and buy it for free. 😉 What a great way to finally test it out.

  1. Go to https://store.unity3d.com/index.html
  2. Select Unity FREE
  3. Add features: iOS and Android (both free until April 8th)
  4. Proceed to checkout
  5. Open email upon reception, and follow the instructions

Now enjoy your brand new installed Unity development tools!

2012: The Year I Stopped Using Microsoft Products

First, this post is about a personal crusade during which I intend to stop using ALL Microsoft products that I am currently using. My reasons to do such a thing are mostly philosophical, and I won’t start hating Microsoft fans/lovers, and I truly don’t want to start a fight with anyone. But feel free to add your thoughts and ideas to this post.

I work in a company where Microsoft products are too often presented as the only answer to a problem, even if nobody has taken the time to analyze other possible solutions. My team though works very hard to promote open source solutions inside the company, and among our clients. So this whole idea (dropping Microsoft products) came to me at work about 2 weeks ago. I was telling everyone in my team we should stop using MS products just to prove to “the world” that it can be done, and you can still live a happy life. Hehe! To make a long story short, I accepted my own idea/challenge! So here’s what I plan to do over the following months.

Close my Hotmail account

I’ve had a Hotmail account for something like 15 years now, and most accounts I have opened on other websites are linked to it. This is why I’m giving me a couple of months to switch all of them to my Gmail account.

Wipe my home PC… for a Hackintosh!

I have a recent PC at home I use for music recording. My band’s first album (available for free here) was partly recorded with it. Our sound engineer works with a software called Cubase, which is sold for Windows and Mac. Because everyone around me works with Cubase, I need to stick to it. This is why I passed the last few days working on building my own Hackintosh. It’s been kind of an easy operation with the great help of iBoot and Multibeast found on this website. My new Hackintosh with Snow Leopard is up and running, and Cubase 6 works like a charm on it.

I’m not much of a gamer, but I do enjoy a game of Star Craft 2 once in a while. I believe I can download the Mac version of the game directly from my Battle.net account. That’s good news!

Flex development

Currently working on a mobile Flex (iOS and Android) project at work, I use the Flash Builder IDE everyday, and it’s Windows only. In the following weeks, I will analyze a couple of possibilities I have in front of me, and I should be able to do all my work with Ubuntu. Those are the possible solutions I have found so far:

  • fb4linux, an unofficial port of Adobe Flash Builder
  • Standard Eclipse IDE with a couple of Ant scripts
  • FlashDevelop, offering a Mac/Linux virtualization, what ever that means

Wine for Adobe Photoshop

For most of my needs, I can live with GIMP instead of Photoshop. But for more complex tasks, I prefer Photoshop. After some short research, it seems that Wine is the answer as WineHQ reports gold rating for Adobe Photoshop CS5.

Use Pidgin instead of MSN Messenger (or whatever the new name is)

Pidgin is a great chat client which works over many protocols, including gTalk. This is where I am heading.

Ubuntu as main OS

For all my computers, including my corporate notebook, I will be using Ubuntu as the only or main OS. I have tried a couple of other distros like Linux Mint, but I keep getting back at Ubuntu. My girlfriend will also switch to Ubuntu. No more Windows in the house! This means no more MS Office which will get replaced by LibreOffice and Google Docs.

Replace MS Outlook for corporate emails and meetings

My employer uses Exchange servers worldwide. My own corporate account is configured/hosted on a Microsoft Exchange Server 2010. I’m anxious to see if Thunderbird 11 will offer some level of connectivity, and if not, I will need to explore different avenues. I haven’t thought a lot about this last point yet.

That’s it!

After realizing all those steps, I think my “life” will be Microsoft-free. At least, I will feel like it is. OK, I will probably still be using some services that have Microsoft written somewhere under the hood, such as self-service grocery checkouts. But I think I will still prove that life without buying or owning Microsoft products is possible. This also means no Ford vehicles for me as long as they’ll be equipped with MyFord Touch/Ford Sync, and XBox game nights at friends’ are over. Hahaha!

Linux Mint 12: Making a Bootable USB Stick

Linux MintWith the release of Linux Mint 12 “Lisa” on November 26th, the distribution gets a lot of attention these days. If you’re like me, you probably like to try “new” distributions from time to time. This is why I felt like giving a try to Mint this week.

Creating the bootable device

  1. Download a Linux Mint image from here
  2. If you’re under Ubuntu, use Startup Disk Creator (installed by default)
  3. If you’re under Windows,  use Univeral USB Installer, free and available here
  4. The rest is pretty straightforward…

Fixing a common problem

Once your USB device is “ready”,  you will get the following error if you try booting from it:

vesamenu.c32: not a COM32R image
boot:

After some short research I found the following fix, which is very simple to apply, and completely solves the problem:

  1. Browse the USB device to the syslinux folder
  2. Open and edit the syslinux.cfg file
  3. The first line should read: default vesamenu.c32
  4. Change it to: default live
  5. Save and close the file

That’s it! You’re now ready to try/install Linux Mint 12 “Lisa”.

Flash Builder: How to Disable the Annoying Click Sound

Adobe Flash Builder 4 LogoI’ve been developing in Flash Builder 4 (under Windows 7) a lot in the last months, and there’s a detail that REALLY annoys me: a click sound every time a file is opened or closed, or when a information bubble pops, and in too many other occasions. After going through each and every Flash Builder option, I finally found a way to get rid of that sound with the precious help of our friend Google. Seems this “problem” is related to Eclipse (on which Flash Builder is built), and Windows (no way!). So the way to disable this click sound is by going to:

Control Panel -> Sounds ->Windows Explorer -> Start Navigation

Set this value to “None”, and you’re done! You don’t need to code with your speakers turned off anymore!

The Mouse that Saved My Life

Evoluent Vertical Mouse 4Ok… it only saved my right wrist. But when you work as a computer engineer, it’s almost as saving your life.

A love story

First time I heard about Evoluent’s VerticalMouse was on TV in show where they were comparing ergonomic mice, about 7 years ago (wow, it’s been a while). Some time after that, I bought a VerticalMouse 2 which, to be honest, took me a bit more than a week to completely master. I loved this mouse from day one, even if I had some difficulty using it at first. But with it’s great resolution, capability to work on all surfaces I’ve tried, its very light weight, the way I never have to move my wrist while using it, and feeling all the weight of my arm being supported by my forearm and not my wrist, I knew I had found the right mouse.

Why I started using this mouse in the first place

First of all, my right wrist suffered many brutal shocks in the time I was a skatepark adept. Second of all, I’m still an active snowboarder, and that sport often gets hard on the wrists. Finally, I’m a bass player, and I play with with my fingers only. Also, I’ve seen many people with carpal tunnel problems who had to have cortisone shots in their wrists… Anyway. At the time I thought: “I know I’ll have to use a mouse at work all my life, so why not act today?!”

New model review

After 7 seven years with my VerticalMouse 2, it recently stopped working. That’s why I ordered a standard size VerticalMouse 4 on Monday. It finally arrived today, and I’ve been using it for several hours now. I am so NOT disappointed! I love the space they added for your little finger, the fact that I can change the precision (or resolution) with a hardware button is very useful, and the shape of the mouse itself has greatly improved since version 2. They also added a second thumb button, which I use as a forward button. As I’m already a VerticalMouse use, it felt comfortable right away. Finally, it looks great with blue logo light and three green precision level lights.

I totally recommend this mouse to anyone who already has wrists problems or forearm problems or someone who wants to PREVENT problems. If you’re in the same position I am, you’ll be using a mouse at least 40 hours a week for the next 30 years or so. It might be the right time to start preventing recurrent problems.

Render Your Own 3D Model in QCAR

Teapot 3D Model

Note: this article is short and doesn’t give detailed answers as much as I would have liked. I started writing it a while ago and realized it had never been published. I haven’t worked with QCAR for a couple of months now, so the subject isn’t so fresh in my mind anymore. Here it goes…

I’ve worked with QCAR for about two months earlier this summer. Using the library is very easy, and it gives pretty good results in terms of responsiveness and robustness. But because my knowledge of OpenGL is very limited, my worst problem has been importing my own 3D model and making it render correctly (with textures and proper lighting).

Use Blender to triangulate

First, mobile devices don’t run the standard OpenGL library, they run OpenGL ES. This means 3D models have to be triangulated or they won’t render at all. Triangulation is the process of dividing all polygons into triangles.

Blender is a free open source 3D graphics application. It can easily be installed on any Ubuntu version by installing the package named blender. Using Blender you’ll be able to triangulate your model when exporting to an .obj file. Then you’ll have to export the .obj file to a .h, which finally can be imported into your QCAR/Android project. This might be “great” for testing, but in the long term, you’ll run into dozens of problems of lighting, reflection, animation, etc.

Texture dimensions

A problem you might run into is using badly dimensioned textures. This problem was kind of hard to find for me as you only get runtime fatal errors which don’t give any relevant detail. But you need to know that almost all mobile devices will only take squares and 2×1 / 1×2 rectangles for texture files. For example, these dimensions would work: 512 x 512, 32 x16 and 128 x 256 pixels. These would not : 1024 x 16, 512 x 64 pixels. Another thing with textures: depending on models, there are limits to the total number of texture files you can load at the same time in an application, and there are limits to their dimensions (1024, 512, and 256 pixels).

I recommend using Unity

According to Wikipedia, “Unity is an integrated authoring tool for creating 3D video games or other interactive content such as architectural visualizations or real-time 3D animations.” In other words: it makes A LOT OF STUFF much better and much faster than an OpenGL developer (or a whole team) would do. What are the downsides? Size (approximately 16 to 20 MB when correctly compiled), cost ($400 for the Android license), and finally, support is not as good on Android as it is on iOS. More information available on Unity’s website.

Even if Unity’s solution isn’t perfect (are there any perfect solutions anyway?), it is in my opinion a million times better than working with your own 3D model and custom OpenGL ES. You’ll be able to simplify your model(s) to enhance performance (which is very important on mobile devices), lighting and other visual effects will be much easier to create, etc. Overall, you’ll get a much better result for way less effort. Everyone wins!

Please visit QCAR’s developer site for SDK download, documentation on how to start a QCAR project, how to integrate the Unity extension, and more.

Flex application on iOS with Flash Builder 4.5.1

Why Windows?

Flex on iOSFirst thing I have to say is that this tutorial is for Windows only. I’m sorry, but at this point, developing Flex applications under Ubuntu is a bit too complicated. I am not a Mac user, so I have to use Windows for Flex development. My computer has an i7 CPU and 8GB of RAM, so I prefer to use a Windows 7 virtual machine instead of dual boot, but feel free to go with your own preference here.

Adobe Flash Builder 4.5.1

On June 20th, an update of Flash Builder 4.5 (4.5.1 in fact) was released. It includes more support for iOS and Blackberry tablet. It is now very easy to deploy on iOS devices, as long as you have the correct certificate files (next section).

Before you continue, make sure your Flash Builder is up-to-date:

  1. Start it as administrator (right click on the program icon and click “Run as administrator”)
  2. Go in Flash Builder’s Help menu -> Search for Flash Builder Updates…
  3. Accept and install all updates
  4. Go back to Help menu -> Software Updates…
  5. Accept and install all updates
  6. Restart Flash Builder

Generate required certificates

To be deployed in “development mode” on your iOS device(s), your application needs to be digitally signed. Here’s the documentation on how to achieve all the different steps. Remember to follow instructions for Windows!

Three very important things you need to know:

  1. Open a DOS shell “as Administrator” to avoid some OpenSSL errors and warning.
  2. Before generating your key (as you will read in the documentation), execute the following command in your DOS shell: set RNDFILE=.rnd or you will get the following error: unable to write ‘random state’ e is 65537 (0x10001).
  3. When using OpenSSL, do not ignore error messages. If OpenSSL generates an error message, it may still output files. However, those files may not be usable. If you see errors, check your syntax and run the command again.

Create a Hello World application

Now, let’s create a very simple Hello World application using Flash Builder.

  1. In Flash Builder’s menu,go to: New / Flex Mobile Project
  2. Give it a name and click Next
  3. Select Apple iOS as your only target platform
  4. Select the View-Based Application template and click Finish
  5. Add a simple Label object saying “Hello World” or whatever you like in the View that is automatically created
  6. Let Flash Builder know about your certificates:
    1. Open the Project Properties window
    2. In the left menu, go to Flex Build Packaging / Apple iOS
    3. Browse and select your certificate file (.p12 file created earlier)
    4. Browse and select your provisioning file (downloaded from your Apple account)
  7. Build your project (or make a release build for better performance and lighter footprint).

For a video tutorial that might help you even more, please visit this page.

Add your device to your developer account

Just like it is required during standard native application development, your device needs to be “ready” for development. Here’s Apple documentation on how to do that: Provisioning a Device for Development (you’ll have to scroll down a little). I’m sorry for not giving any more help on this point. I don’t know a lot about Apple’s development processes. That part was actually done by another member of my team. But I’m sure Google will give you all the help you need. 😉

Deploying using iTunes

You’re almost there! Here are the final steps, all done using iTunes:

  1. Import your provisioning profile into iTunes
  2. Import the ipa file built by Flash Builder (found in the “bin-debug” folder of your project’s workspace) into iTunes
  3. Sync your iOS device so your application gets installed

That’s it! I’m aware there might be some missing details in this tutorial, but feel free to post any question you might have. I’ll be very happy to help.

Install LibreOffice Dictionaries Under Ubuntu

======

UPDATE: read this article if you’re using Ubuntu 12.04 (Precise Pangolin)

======

Since the arrival of Natty Narwhal (11.04), LibreOffice LogoLibreOffice has become the default productivity suite under Ubuntu. Being a French speaking person, installing the French dictionary turns out be really useful. It may sound stupid, but it took me about an hour of googling before finally finding this page: LibreOffice – Ubuntu Wiki.

Installing the good package

It turns out the only thing you have to do is install the right package for every language you need. For example:

  • French: language-support-writing-fr
  • Spanish: language-support-writing-es
  • Italian: language-support-writing-it

Open Synaptic Package Manager, install the package of your choice, and you’re done!

Installing an OpenOffice extension

For some reason, you might want to install a dictionary as an OpenOffice extension (also works with LibreOffice). In this case, visit this page, and download the extensions (one extension per language) you need. Double click on each downloaded extension file (.oxt) and LibreOffice will do the rest. For most users, I suggest installing the package instead of the extension though.

Remove Underline from Android TextView Link

As you may already know, the TextView object has a property named android:autoLink that creates HTML or email links automatically. You also got properties to change link colors such as android:textColorLink and android:textColorHighlight. The only missing option many of us would like to have is a way to remove the underline under the link itself.

Sadly, removing the underline seems to be somewhat “hard” to achieve. So here’s my way of doing this, greatly inspired of the code I found on this blog.

First, let’s create a TextView:

<TextView android:id="@+id/myTextView"
          android:text="Want to search www.google.com?"
          android:textColor="#409bbf"
          android:textColorLink="#783302"
          android:textColorHighlight="#ff0000"
          android:autoLink="web"/>

The TextView above should look approximately like this when rendered in Android:

Want to search www.google.com?

Then we need a “util” class we’ll name URLSpanNoUnderline:

package com.evilcodingmonkey.android.util;

import android.text.TextPaint;
import android.text.style.URLSpan;

public class URLSpanNoUnderline extends URLSpan {
    public URLSpanNoUnderline(String p_Url) {
        super(p_Url);
    }

    public void updateDrawState(TextPaint p_DrawState) {
        super.updateDrawState(p_DrawState);
        p_DrawState.setUnderlineText(false);
    }
}

If you already have a StringUtil-like class (I always have one in my projects), add the following function to it. You may add this function anywhere you want anyway…

/**
 * Removes URL underlines in a string by replacing URLSpan occurrences by
 * URLSpanNoUnderline objects.
 *
 * @param p_Text A Spannable object. For example, a TextView casted as
 *               Spannable.
 */
public static void removeUnderlines(Spannable p_Text) {
    URLSpan[] spans = p_Text.getSpans(0, p_Text.length(), URLSpan.class);

    for(URLSpan span:spans) {
        int start = p_Text.getSpanStart(span);
        int end = p_Text.getSpanEnd(span);
        p_Text.removeSpan(span);
        span = new URLSpanNoUnderline(span.getURL());
        p_Text.setSpan(span, start, end, 0);
    }
 }

The last thing you have to do to replace all occurences of URLSpan by URLSpanNoUnderline in your TextView objects. I do that by modifying the onCreate function of my Activity classes. For example, this is the onCreate function of the “about” screen of my app:

protected void onCreate(Bundle p_SavedInstanceState) {
    super.onCreate(p_SavedInstanceState);

    setContentView(R.layout.about);

    // Remove underlines from HTML links
    TextView txtUrlGoogle = (TextView)findViewById(R.id.textUrlGoogle);

    // Make sure the TextView was instantiated correctly
    if(txtUrlGoogle != null) {
        StringUtil.removeUnderlines((Spannable)txtUrlGoogle.getText());
    }
}

And we’re done! As you can see, this is totally reusable. All TextView properties such as color will continue to work as they are intended to. As I said at the beginning of my post, I did not invented this way of removing underlines, but I think this will help clarify it, and show how it can be easily reused.

« Older posts Newer posts »

© 2017 Evil Coding Monkey

Theme by Anders NorenUp ↑