0

Switching my Development Environment to Bluefish (Updated)

Update (10/15/2010): It seems that the snippets plugin for Bluefish is just used for reference and reuse of code. It doesn’t affect the auto-completion feature, which disappoints me. However, it could help me to learn new HTML 5 and CSS 3 techniques.

I had always used NetBeans for my only web development environment for a long time. Today when I tried it on the netbook and felt a little sluggish. Perhaps it’s because it is a multi-purpose IDE – PHP, Java, C, and Ruby. I don’t use many of its features, such as upload and compile/run, because I use FireFTP and command line to upload and compile code. These features are waste of RAM space and I think that’s the cause to slow down the system.

Therefore I tried to search for a light-weight web development IDE for GNU/Linux and found Bluefish. It has the features I need for a perfect IDE to develop web applications. The auto-complete and spellcheck are two of my most used features. It also has the snippets plugin which I think it is used to add more tags support for the auto-completion feature, such as the HTML 5 tags add pre-defined tags for the reuse purpose.

Bluefish starts up on my netbook very fast. It also runs very smoothly compare to the NetBeans. I enjoyed using it so far. To install Bluefish, type the following command:

sudo apt-get install bluefish

It should be placed in the Programming section after installed it.

By the way, it appears to also support the C language according to the snippets, although I have not test it yet.

Please share your thoughts in the comments section on how does the Bluefish IDE work for you.

http://fireftp.mozdev.org/
0

NetBeans 6.9 was Released Today

I’m exited to know that latest NetBeans was released today. I happened to download 6.9 during the class at Montgomery College today. I have no idea about today’s latest release until I downloaded and installed it to the Windows XP-based machine that I was working on and noticed that it is titled NetBeans IDE 6.9. I plan to upgrade NetBeans on both of my netbook and laptop to 6.9 tomorrow. Visit release information page to learn more about this latest release. Also check out Guided Video Tour of the NetBeans IDE 6.9 which I think it’s a new section for 6.9.

0

C scanf Function

Continue from last C post, I will discuss scanf function today. The scanf function is similar to printf function with the opposite functionality. The printf function outputs the string on the screen whereas scanf function lets the user input values from the keyboard. The example of scanf function which I learned is scanf (“%d”, &number). As you can see, right now I only know how to use integer C variable type. I will learn to use other variable types as the tutorial progresses. Notice that there is an & operator in front of number variable. In my experience for basic C++, I remembered that it is either a reference or pointer. Here is my entire program code for the scanf exercise:

/* Generated by NetBeans */
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char** argv) {
/* End of generation */

 int brothers, sisters, children;

 printf("How many brothers and sisters do you have?n");
 printf("Brothers: ");
 scanf("%d", &brothers);
 printf("Sisters: ");
 scanf("%d", &sisters);

 printf("How many children do you have? ");
 scanf("%d", &children);

 printf("You have %d brothers and %d sisters.nYou have %d children.n", brothers, sisters, children);

 fflush(stdin);

 /* Generated by NetBeans */
 return (EXIT_SUCCESS);
}

As you can see in the code above, I use NetBeans both for my PHP development and C programming IDE. NetBeans automatically included the necessary C libraries and common statements for the project. The fflush(stdin) statement escapes the enter key according to the tutorial.

2

My hatred of Microsoft and Adobe as a GNU/Linux user and a web developer

I had used Dreamweaver, Flash, Fireworks, and other Adobe products long before Adobe acquired Macromedia. At that time, I didn’t know the existence of GNU/Linux and open source communities. I didn’t even decide on my career as a web developer yet. Thanks to Microsoft’s announcement of Windows Vista, I decided to look for other Operating Systems beyond Windows that are able to run on the older hardware eternally (by the way, I didn’t know other OSes besides Windows back then), meaning that the future version of OS will still be able to work on old hardware. I found GNU/Linux, specifically Ubuntu.

After one year of switching back and forth between GNU/Linux and Windows, I finally made the decision to stick to GNU/Linux. However, I still would test the browser compatibility in IE through VirtualBox. And here comes my hatred of MSIE. During the course of my web development, I’ve read numerous articles about how Microsoft doesn’t follow the W3C standards for their Internet Explorer to make web developers suffer from browser incompatibility issue. I had enough struggle for the Internet Explorer, I decided to use some jQuery to encourage those who view my website to ditch their Internet Explorer.

I have become to hate Adobe since the day I switched to the Eclipse and NetBeans IDE to develop my projects. After Adobe announced that Flash Builder and ColdFusion Builder are based on the Eclipse, I was excited to know that Adobe finally makes their development tools available on all of the major OSes. It disappointed me when I went to download the beta version of these two builders, it only offers Windows and Mac versions, no GNU/Linux version anywhere. Since Eclipse uses its own EPL license instead of GPL license to govern the use of Eclipse, Adobe can make modification to its code and sell it as their own products. This doesn’t mean that Adobe can discriminate against GNU/Linux users from using their products since Adobe uses Linux on their Adobe.com website.

As an opposite effect, these hatreds actually make me become more involved with open source technologies, such as HTML 5 and Ogg theora. I use open source ColdFusion engine Railo to develop ColdFusion websites as well. I think that ActionScript will be replaced by jQuery and other JavaScript frameworks and FLV will be replaced by either H264 or Ogg Theora depending on which side will win the online video wars.

10

Enable Line Wrap option in NetBeans Nightly

I always download NetBeans nightlies PHP pack since the beginning of April. However, I couldn’t download them during the last two weeks because of the huge workload that I had. I downloaded the latest NetBeans nightly 201004260200 and noticed that my useful line wrap feature is grayed out. I don’t know why is this feature disabled and since when. After I researched around the Internet, I found this bug report on the NetBeans website. According to one of the comments, the feature was disabled by default since April 13. Based on the bug report, to enable the line wrap feature, you need to edit the netbeans.conf file inside the /etc folder of the NetBeans installation directory, for example, mine is ~/netbeans-dev-201004260200/etc. Then add the line below inside the double quote of the netbeans_default_options variable:

-J-Dorg.netbeans.editor.linewrap=true

The whole line should now be

netbeans_default_options=”-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Dnetbeans.logger.console=true -J-ea -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true -J-Dorg.netbeans.editor.linewrap=true”

After that, restart the NetBeans IDE and the line wrap feature should enabled by default and set to “Anywhere”. To verify, go to Tools -> Options -> Editor -> Format. You should see Line Wrap option enabled at the bottom .

The bug report stated that it will slow the performance of the application if this feature is enabled by default. In my experience, after enabled this feature by editing the above config file, it actually perform faster than before. I hope that the line wrap feature will be enabled by default in the final release of 6.9 on June 9 because I really like this feature.

You can download NetBeans nightlies at http://bits.netbeans.org/netbeans/trunk/nightly/.