case
23Jan/130

PE 101

For some reason, this picture brightened my day

30Mar/123

Setting up a IDE to play with GO on Windows


This week Google launched Go, an open source programming language that seems really promising. I've been messing around with the weekly builds but now the Windows build is production ready so here we go.

After downloading and installing the package, the next obvious step was to look for a IDE. There are few choices out there but after trying almost all of them nothing really worked as I've expected. The only one that raised to my expectation was Sublime Text 2 + some 3th party plugins to really have it going.

Ok. So now let's make it happen.

1. Install Go

First thing first. If you didn't already installed it, this is the first step.
Go to http://code.google.com/p/go/downloads/list?q=OpSys-Windows+Type%3DInstaller and download the appropriate package for your machine.

2. Install Sublime Text 2

Sublime Text is a commercial product but it can be used for evaluation purposes. So go and download it from http://www.sublimetext.com/2. Again, choose 32 or 64 bit version.

The last build available on their website already has syntax highlighting for .go files so ... yey

3. Install 3th party libraries and plugins for Sublime Text

This is a lengthy one but without this you just have a new text editor on your computer that can do syntax highlighting to .go files. If that is enough for you then stop here. If not let's get busy.

First you need Sublime Package Control. To install it, open up Sublime Text, press ctrl+` to bring up the console and paste the following:

import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'

 
Restart Sublime Text. Now you need to bring up the command palette with ctrl+shift+p and start typing Package Control: Install Package then press return or click on that option to activate it. You will be presented with a new Quick Panel with the list of available packages. Type GoSublime and press return or on its entry to install GoSublime.

Now you have code completion and other IDE-like features provided by GoSublime. There is one more really helpful plugin you should install.

If you have Git installed then open up a cmd, and type

cd %APPDATA%\Sublime Text 2\Packages\
git clone git://github.com/mkrautz/goimport.git GoImport

If you don't have Git then you must download GoImport and extract the zip file in a new folder at %APPDATA%\Sublime Text 2\Packages\GoImport

Now in Sublime Text, go in the menu at Preferences -> Key Bindings - User and between the [] add the following bindings, so your file will look something like this:

[
   { "keys": ["f1"], "command": "prompt_go_import" },
   { "keys": ["f2"], "command": "prompt_go_drop" }
]

This will bind the F1 and F2 keys to popup the go import dialog which will allow you to add from anywhere you are in your file libraries to the top import block.

4. Adding new run/build system

Using Package Control (just like you installed GoSublime) look for and install Go Build. For alternative install informations and other usage and descriptions then go to git.

This will bind F5 key to execute your code and F7 to build your executable and Ctrl-F5 to run your tests.

All done. Now for the final step...

5. Learn GO

- How to write GO code (need to know)
- Tour of GO (kick ass tutorial)
- Effective GO (tips on writing clear, idiomatic Go code)
- Let's learn GO (book)
- Golang nuts mailing list (awesome support)
- Google Search ( 😛 )

Hope this helps, I don't know myself much more than this yet. If you find something cool please share it with me too. Cheers and happy coding.

1Feb/106

Create Flex/AS3 applications for Mobile Devices

elips-studio-3-boxYup! Flex Apps on your mobile. And I'm not talking about Flash Lite and you won't need CS5 either.
ELIPS Studio converts the Flex code in native code for Windows Mobile, Symbian, Android, iPhone and mass-market mobiles. It's still beta and you have to register for a beta account to get it but I think will do wonders for the mobile dev. world.

And in their words:

"ELIPS Studio 3 is a plug-in for Adobe Flex Builder, a widely used IDE for internet & desktop application. Our plug-in allows Flex to go mobile!

The product offers a mobile-optimized Flex Framework, plus numerous Flex extensions, including mobile UI components & access to mobile device features (voice call, SMS, access to calendar and contacts, to the camera, etc.)

The product includes a form-factor device simulator allowing you to see your application behavior on different devices. It also includes a network simulator allowing to generate calls, SMS, etc."

So..get it while it's hot 🙂

25Jan/100

Static files locked by Jetty in Eclipse

jetty_logo If you use Jetty you might notice that once it's running you can't edit any static files because it says they are already in use and locked.
Why ? Because Jetty buffers static content for webapps such as html files, css files, images etc and uses memory mapped files to do this if the NIO connectors are being used. The problem is that on Windows, memory mapping a file causes the file to be locked, so that the file cannot be updated or replaced. This means that effectively you have to stop Jetty in order to update a file.

In case this happens follow these steps:

1. Extract the runjettyrun_1.0.1.jar in the eclipse plugin directory
2. Extract the jetty-6.1.6.jar in the lib directory of the previous jar.
3. Edit the file org\mortbay\jetty\webapp\webdefault.xml and change the "useFileMappedBuffer" to false. It should look like the following:

1
2
3
4
<init -param>
      <param -name>useFileMappedBuffer</param>
      <param -value>false</param>
</init>

4. Pack everything back up and overwrite the runjettyrun jar in the plugin directory.
5. If you still get the error after step 4 start eclipse.exe with -clean and then recreate the Jetty configuration. (It just need to replace whatever jar's it copies in your workspace .plugins dir)

17Apr/090

Free Windows serials keys and more


Belarc Advisor is a free personal PC Audit software that builds a detailed profile of your installed software and hardware.

What this tool also does is identifing licenced software and unlicenced ones. Stupid enough, it makes a list of those licences, and for some reason, different websites publish this hidden somewhere on their website. But as we all know, you can keep nothing secret from our good old friend Google.

So...if you need a software licence, just google for "Belarc Advisor Current Profile" (quotes included) and see a computer report with everything that computer has installed and the serials for those softwares.

Here's an example (somewhere on the bottom of the page you can find the serial keys for office and windows and others)

If you want to be more specific, add the software name in the google search: "Windows XP Professional" "Belarc Advisor Current Profile"

freewindows xp serial key