Nov 5, 2011

Guidelines for creating good open source software

There are 19 guidelines for creating good open source software listed in his essay:

  1. Every good work of software starts by scratching a developer's personal itch.
  2. Good programmers know what to write. Great ones know what to rewrite (and reuse).
  3. Plan to throw one away; you will, anyhow.
  4. If you have the right attitude, interesting problems will find you.
  5. When you lose interest in a program, your last duty to it is to hand it off to a competent successor.
  6. Treating your users as co-developers is your least-hassle route to rapid code improvement and effective debugging.
  7. Release early. Release often. And listen to your customers.
  8. Given a large enough beta-tester and co-developer base, almost every problem will be characterized quickly and the fix obvious to someone.
  9. Smart data structures and dumb code works a lot better than the other way around.
  10. If you treat your beta-testers as if they're your most valuable resource, they will respond by becoming your most valuable resource.
  11. The next best thing to having good ideas is recognizing good ideas from your users. Sometimes the latter is better.
  12. Often, the most striking and innovative solutions come from realizing that your concept of the problem was wrong.
  13. Perfection (in design) is achieved not when there is nothing more to add, but rather when there is nothing more to take away.
  14. Any tool should be useful in the expected way, but a truly great tool lends itself to uses you never expected.
  15. When writing gateway software of any kind, take pains to disturb the data stream as little as possible—and never throw away information unless the recipient forces you to!
  16. When your language is nowhere near Turing-complete, syntactic sugar can be your friend.
  17. A security system is only as secure as its secret. Beware of pseudo-secrets.
  18. To solve an interesting problem, start by finding a problem that is interesting to you.
  19. Provided the development coordinator has a communications medium at least as good as the Internet, and knows how to lead without coercion, many heads are inevitably better than one.
Reference: http://en.wikipedia.org/wiki/The_Cathedral_and_the_Bazaar

Jul 12, 2011

Pixel Bender error: unable to resolve your pbj file for transcoding

You should export the pixel bender kernel into pixel bender bytecode file in order to embed in your flex project.

Jun 28, 2011

Yahoo Mail POP access

FOR THOSE OF YOU you with Yahoo Mail non-premium accounts, you must be homesick for those days when your free Yahoo webmail had POP access and mail forwarding.

Since December 2010, those two functions are available only to premium (i.e. paid) account holders, as The Naked Listener wrote in back in 7 January.

Since then, I’ve been reliably informed (and reliably tested) a POP/forwarding workaround. The tactic is to set your account to the Philippine region. The U.S. and all of the European regions don’t work.

Setting your Yahoo Mail to the Philippines makes for little if any impact on usability and navigation because Philippine regional content are entirely in English.

CONFIGURATION

1. Log into your Yahoo Mail in the usual way.

2. Click “Options” (or “Mail Options” as the case may be) somewhere on the top right corner of the main Yahoo Mail interface.

3. A dropdown menu appears. Click “Mail Options.”

4. On the left panel, click Account Information” and you’ll be asked for your password again.

5. Your Account Info screen comes up now.

6. Scroll down to Account Settings” section and click “Set language, site, time zone.

7. In “Regional Site and Language,” set it to “Yahoo! Philippines” and click “Save.” (Leave the dropdown menu “Time Zone” underneath unchanged.)

8. Return to the main Yahoo Mail interface the normal way (or just type http://mail.yahoo.com in your browser to do that).

9. Go back to “Options” (or “Mail Options”) somewhere on the top right corner.

10. On the left panel, click “POP & Forwarding” and choose below:

  • EITHER “Allow your Yahoo! Mail to be POPed
  • OR “Forward your Yahoo! Mail

and click “Save changes” button on the top bar.

TEST

11. In Yahoo Mail, compose and send a test email to yourself (at Yahoo and at your other email address). The test email should arrive in both places.

12. In your other email, compose and send another test email to yourself (just to Yahoo this time). That test email should arrive in both places.

13. That’s it!

NOTE

14. It seems this workaround works for free Yahoo Mail accounts that are 10+ years old. You should still try it out regardless of how young or old your account is.

15. This workaround doesn’t work with non-English regional options, such as Japan, Taiwan, etc.

16. Circulate this workaround out of the limelight, or else Yahoo will wise up and plug this loophole.

17. As always with workarounds, your mileage may vary.


Reference:

http://thenakedlistener.wordpress.com/2011/03/10/philyahoo/


Jun 12, 2011

Alchemy settings

To get started with Alchemy on a Windows box, you first need to get cygwin installed. Cygwin is a pseudo linux environment that runs under Windows. This gives us access the the LLVM and the gcc compilers. This is how we are going to take C/C++ code and create a swc that we can access directly from flash.

To get started we are going to first need the Adobe Flex SDK, please download this and unzip it to c:\flexsdk
http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK

Currently the latest release is Flex4.1 Update 4.1.0.16076.

Now we can grab Adobe Alchemy:
http://labs.adobe.com/downloads/alchemy.html

Just check the box at the bottom and download the “Alchemy Toolkit for Cygwin on Windows”
When that finishes downloading, unzip it into c:\alchemy (make sure that you don’t unzip it into folders within that, you want the folder structionto be c:\alchemy and then a bunch of folders such as c:\alchemy\achacks, c:\alchemy\bin, etc…

Next you will need to make sure you have Java installed. If you do, please continue. If you do not, please download and install it from here:
http://www.java.com/en/download/index.jsp

Last up is Cygwin’s setup.exe file:
http://www.cygwin.com/

Look for setup.exe about half way down the page, and download that to c:\cygwin (you can put this wherever you like, but I will be using c:\cygwin and c:\alchemy through out the post for simplicity)
This setup file is basically a client front end that allows you to download and install whatever linux packages you will need to get the job done.

Double click on the setup.exe to get things started.
- Click next on the first screen.
- On the second screen select “install from internet” and click next.
- Set your root directory on the third screen to c:\cygwin and install for all users. Click Next
- Set your local package directory to be c:\cygwin as well, click next.
- Set up your proxy settings if you have any (if you are behind a corporate firewall or something) otherwise select “Direct Connection” and click next.
- Select a mirror, I usually use http://mirrors.kernel.org click next.
- You may get a Setup Alert warning you that this is your first install, so you should check out the docs. This is normal, and fine, just click OK.
- This takes you to the package selection screen.



Yes I know, its scary, but you’ll be fine There are a few packages that we need to install for the Alchemy setup, and a few that I install for convenience. Here are the required packages (you can type the name in the search box to help narrow down the list) Once you find the package, click on the “Skip” button on the left, and that will change to a version number. That means that package will download. The next column over has 2 check boxes. The first says Download Binaries, the second says Download Source. For this we only need the binaries.
Required:
- All -> Devel -> gcc-g++: C++ compiler



- All -> Archive -> zip: Info-ZIP compression utility



- All -> Perl -> perl: Larry Wall’s Practical Extracting and Report Language



Optional:
- All -> Shells -> rxvt: VT102 terminal emulator



- All -> Editors -> emacs: The extensible, customizable, real-time display editor



Once all of the packages are selected, you can click Next
This will bring up a screen about Resolving Dependencies. Make sure the check box is checked at the bottom of the window, and click Next.
The great download starts. Might be a good time to take a quick break as this will take a few minutes.
When the download/install is complete, just click finish.
Finally with everything installed, we can configure it all.

Parts of the next section were learned from:
http://www.developria.com/2009/04/setting-up-adobe-alchemy.html
and
http://labs.adobe.com/wiki/index.php/Alchemy:Documentation:Getting_Started
Both are excellent articles for getting the Alchemy Environment setup and running.
Now we have to add some things to cygwin’s path. In the c:\cygwin\etc folder there will be a file called “profile”. Please open that in Notepad++ or other proper text editor (in other words, not Microsoft WORD!).

The first line that isn’t a comment should be:
PATH=/usr/local/bin:/usr/bin:/bin:$PATH

We need to add alchemy and the flexsdk to that path:
PATH=/usr/local/bin:/usr/bin:/bin:/cygdrive/c/alchemy/achacks:/cygdrive/c/flexsdk/bin:$PATH

Please take note of the /cygdrive/c portions of the path. This is how you access your drives from within cygwin. If you want to access the “e” drive for instance it would be /cygdrive/e/ and not e: as it is within windows.
We also need to make sure all of the Alchemy setup scripts run when we start cygwin. So right before the “PATH=” line that you just edited, we need to add the following:

source /cygdrive/c/alchemy/alchemy-setup

You can now save and close the “profile” file.
If you installed the rxvt package (its a replacement terminal, because the default terminal for cygwin is terrible) then please open your c:\cygwin\cygwin.bat file and make it look like this:

@echo off
C:
chdir \cygwin\bin
start rxvt -sr -sl 10000 -fg white -bg black -fn fixedsys -fb fixedsys -tn cygwin -e /bin/bash --login -i


Now run the cygwin.bat file and it will drop you into a cygwin terminal. We have to do one last bit of configuration and then we are done! Yay!
You will probably get a bit of messaging about Skeleton files being copied over. This is good
Here we have to setup alchemy. So from the terminal type:
cd /cygdrive/c/alchemy

This will put you in the Alchemy directory on your C: drive.
From here type:
./config

You should get a screen that looks like this:



Now close the cygwin window, and in your text editor open the c:\alchemy\alchemy_setup file.
Find the lines:

# Set this variable if you do not want to use the adl executable from your path
#export ADL=/path/to/your/adl (or adl.exe)


and replace the #export line with the following (be sure to remove the # at the beginning of the line)
export ADL=/cygdrive/c/flexsdk/bin/adl.exe

You will also need to locate this line:
export ASC=$(cygpath -m -s -p $ALCHEMY_HOME/bin/asc.jar)

and change it to:
export ASC=$ALCHEMY_HOME/bin/asc.jar

The POSIX to Windows path conversion doesn’t seem to work. This change will throw a warning about POSIX file paths, but everything will work just fine.
Save that, and restart cygwin (c:\cygwin\cygwin.bat)
That should do it! You should have have function cygwin/alchemy environment.
So lets compile something shall we?

Type:
cd /cygdrive/c/alchemy/samples/stringecho

Then type this to remove the old .swc:
rm stringecho.swc

Now you can compile this sample provided by Adobe to make sure everything is cool.

First turn on the Alchemy gcc compiler, type:
(you will only need to do this once per cygwin session)
alc-on

Then run the actual link and compile, type:
gcc stringecho.c -O3 -Wall -o stringecho.swc

If you run into troubles with the swc being corrupt you may need to include the -swc switch as suggested by “coderyy” in the comments. Thanks for the tip!
gcc stringecho.c -O3 -Wall -swc -o stringecho.swc
With any luck you will get a screen that looks like this:



(yes you can ignore the “Arguments Dropped” warning)
if you type ‘ls’ (short for list, same as ‘dir’ in dos) you will see your shiny new stringecho.swc
In the next episode we will go over how to use that .swc and how to create your very own .c files that you can access from Flash!

reference: http://labs.byhook.com/2011/03/01/alchemy-series-part-2-environment-setup/

5 cool Notepad++ tricks

Notepad++ is quite likely the best text editor for Windows. It has a huge range of features that would take quite a few articles to cover. And this exactly what I'm going to do: introduce the incredible power of this highly versatile and sophisticated text editor. No more Notepad or Wordpad for working with text files. Or scripts. Or HTML files.

So, here are (the first) five great tricks that will help you bring out the best of Notepad++.

1. Set Language to match your code

One of the stronger features of Notepad++ is the ability to color pieces of code. This is highly useful when writing C, Matlab or HTML files, allowing you to easily visually distinguish between functions, reserved words, comments, text, and other types of symbols and expressions in your code.



Notepad++ is smart and will automatically detect your code. For example, here's a piece of a Matlab m-file:



2. Bulk find & replace

If you want to replace a certain entry in your file(s), Notepad++ is your (wo)man. Not only can it instantly search through all entries in a file, it can search all open files or even all files in a directory (including sub-directories), and then, only matching certain file types.

3. Search for regular expressions

When it comes to finding what you want, Notepad++ is not limited to mere words. You can also use powerful regular expression to match dynamic entries. For example, the below search will find (and replace) all tags in the source of HTML files, regardless of the actual image size specified:

Of course, some knowledge of regular expressions is required to use this feature. Not surprisingly, these regular expressions will also serve you will if you dabble in the Linux command line with sed or awk commands.



4. Tidy HTML code

If you're writing web articles, there's a fair chance your code will include a bit of unnecessary breaks, misaligned tags and so forth. Notepad++ can Tidy your HTML code.

For example, here's a piece of unformatted text:






5. Save all open files

While this may not sound too exciting, imagine you have 100 open files - Notepad++ behaves like Firefox in this regard and opens documents in tabs - each one changed after you ran a bulk find & replace earlier. Saving them one by one can be tedious. Notepad++ saves you the hassle. You can save all open files at once.

May 23, 2011

Feb 20, 2011

Chrome Extensions

  1. Sharebus Search - You can reach 1-Click files of movies, mp3, documentaries etc by using this chrome extension.
  2. Divxplanet Subtitle Search - You can simply search subtitles by using this extension, it is a turkish web site.
to be continued...

Read/Write NTFS Files In Mac OS X

I have been having a hard time finding good suggestions on how to access and edit hard drives that are in NTFS format on my Mac. The main reason I wanted to be able to do this was so that I could edit my Windows 7 drive when booted in my Mac partition. I have been looking for something for quite awhile with now avail, but then yesterday I finally came across something that answered my prayers.
What I'm talking about is some little code that was made by a Google engineer that made some changes to the driver for NTFS file format in your Mac OS X. All that you really need to do is install it and restart your computer and just like that you are able to edit NTFS drives in OS X. It is called NTFS 3G.

Here is the link:

http://downloads.sourceforge.net/catacombae/NTFS-3G_2009.4.4-catacombae.dmg?use_mirror=

It is really simple to install and after a quick restart it is fully functional. I hope this helps all of those out there looking for this solution.

Is it impossible to download files from 1-Click Hosters on Mac OSX?

No, I think the best download manager is Tucan Manager. you can use your premium accounts on 1-Click Hosters.

Tucan Manager is a free file sharing application designed for 1-Click Hosters. Fast and lightweight, Tucan is fully open-source and compatible with Windows, GNU/Linux, and MacOSX.

With Tucan's modular support for the principal Hosters, captcha resolution, interchangeable links, premium user accounts, and many other great features, you'll learn why users around the world are making the switch to free, open 1-Click Hosted file sharing.

It is FREE ! I checks the link's availability...

GET I --> http://www.tucaneando.com/

Feb 17, 2011

Disabling Dashboard

Open Terminal, and then type this command, followed by the Return key:

defaults write com.apple.dashboard mcx-disabled -boolean YES

This tells the system that you no longer wish to have Dashboard available. However, the Dashboard task is actually “owned” by the Dock, so to make your changes take effect, you need to restart the Dock. The easiest way to do that is to type this command into the Terminal (and press Return when done):

killall Dock

After the Dock restarts, hit F12 and you’ll see…nothing at all. If you run Activity Monitor, you also won’t find any Dashboard widgets in the list of tasks, even if you had several open when you ran the above command. Dashboard has been eliminated from your system, and won’t return until you tell it to do so. You can do just that by opening Terminal again, and typing this command:

defaults write com.apple.dashboard mcx-disabled -boolean NO

Once again, you’ll have to use the

killall Dock

command to make the changes take effect. Once you do, though, you’ll find that Dashboard is back as usual—and any widgets you had opened on the Dashboard will still be open.

Visual Studio Keyboard Shortcuts

Playing with keyboard shortcuts is very interesting and reduce the headache of using the mouse again and again while programming with visu...