Tuesday, August 12, 2008

50 years ago

40 years Ago.............
A program was..... a television show
An application was.... for employment
Windows were..... something you hated to clean
A cursor.... is profanity
A keyboard was.... a piano
Memory was.... something you lost with age
A CD was... a bank account
And if you had a 3 1/2 floppy you hoped no one found out
If you unzipped in public you went to jail
Compress was something you did to garbage
A hard drive was a long trip on the road
Log on was adding wood to a fire
A backup happened to your toilet
A mouse pad was where a mouse lived
Cut you did with scissors
Paste you did with glue
Copy was d soldiers slang
A web was a spider's home
Oracle was just another word
Java was just an island
Pascal was a Mathematicians name
Net was used in fishing
Python was a snake
Mouse.........U hate them sour
Bugs are a nuisance at home
And a virus was the flu!!!

TIMES SURE HAVE CHANGED ALL THAT!

Tuesday, July 22, 2008

SABLE + FESTIVAL

I was actually playing around with festival to see d cool things I could do with it when I run across a problem with SABLE. I dont have time to describe the problem here as those who use sable and festival will eventually come accross same problem...the hack however is simple and if u need it just ask me...i will gladly love to post the three files I modified to get sable working with festival.

ciao

Thursday, June 12, 2008

Threadiculous

I had a conversation with a friend and I guess I should post it here...its one of those few times when u get down real dirty to solve simple problems....

(6:21:03 PM)
cyberdeen: quick in one min.....
(6:21:09 PM) cyberdeen: will this code compile?
(6:21:10 PM) cyberdeen: new Thread() {
public void start() {
busiLayer.doRegister(url);
}
}.start();

(6:21:56 PM) adeniranope: no
(6:22:09 PM) adeniranope: public void run()
(6:22:16 PM) cyberdeen: gotcha..it will compile
(6:23:22 PM) cyberdeen: but u are right..it wont do what it suppose to do
(6:23:47 PM) cyberdeen: but it will compile...to make do what its intended for use public void run()
(6:23:48 PM) adeniranope: as in what?
(6:24:09 PM) cyberdeen: the thread wont create a nw Thread wc is d essence of the code
(6:24:29 PM) cyberdeen: to make it create a nw process(sorry not thread) u must call run
(6:24:46 PM) adeniranope: dat's true
(6:24:50 PM) cyberdeen: which is called by the start() method
(6:25:07 PM) cyberdeen: dese are the kinda question u see on javablackbelt
(6:25:10 PM) adeniranope: where did u get dat from?
(6:25:30 PM) cyberdeen: i wrote it myself
(6:26:05 PM) cyberdeen: so that network connection wont block
(6:26:55 PM) adeniranope: so u mean dat code won't compile?
(6:27:10 PM) cyberdeen: it will compile...it will even run
(6:27:19 PM) cyberdeen: but networking will still be blocked
(6:27:38 PM) cyberdeen: i mean it will still block input until it is finished
(6:28:35 PM) adeniranope: so what's the solution?
(6:29:01 PM) cyberdeen: new Thread() {
public void run() {
busiLayer.doRegister(url);
}
}.start();

(6:29:21 PM) cyberdeen: public void start() ==== public void run()
(6:29:35 PM) adeniranope: i'm correct now
(6:29:41 PM) adeniranope: ?
(6:29:44 PM) cyberdeen: in a sense u are
(6:29:46 PM) adeniranope: abi
(6:29:55 PM) cyberdeen: but the question is will d code compile?
(6:30:01 PM) cyberdeen: wc u answered no
(6:30:22 PM) cyberdeen: but it will compile....the error is not syntax but semantics...she u get?
(6:30:47 PM) adeniranope: not at all
(6:31:02 PM) cyberdeen: i asked will d code compile?
(6:31:06 PM) cyberdeen: and u said no
(6:31:08 PM) cyberdeen: abi?
(6:31:15 PM) adeniranope: yes ooooooooo
(6:31:29 PM) adeniranope: en en why?
(6:31:43 PM) cyberdeen: but if u javac the code(compile) it will compile
(6:31:53 PM) cyberdeen: without errors
(6:32:00 PM) cyberdeen: u get? now abi
(6:32:07 PM) adeniranope: yes
(6:32:10 PM) cyberdeen: but still the code has errors
(6:32:33 PM) adeniranope: but if u run it what will happen?
(6:33:02 PM) cyberdeen: it wont create a new process
(6:33:16 PM) cyberdeen: which is what we want to code to do right?
(6:33:31 PM) adeniranope: and so ....
(6:33:37 PM) cyberdeen: so if a new process is not created....
(6:33:46 PM) cyberdeen: the code wont do wot its meant to do
(6:33:58 PM) cyberdeen: but it will COMPILE
(6:34:29 PM) adeniranope: what about the new Thread()
(6:34:51 PM) cyberdeen: a Thread is not a thread if there is no run method
(6:35:01 PM) adeniranope: ok
(6:35:16 PM) cyberdeen: u see the thing dt makes a thread a thread is run()..without run its just another class
(6:35:37 PM) adeniranope: so what about the .start()
(6:35:47 PM) cyberdeen: ok
(6:35:56 PM) cyberdeen: we need to call the run methos right?
(6:36:22 PM) adeniranope: dat means u've to replace the start method with run()
(6:36:29 PM) cyberdeen: dt is what the .start() will do for us
(6:36:41 PM) adeniranope: so dat when u call start() it will execute run
(6:36:50 PM) cyberdeen: when u call start...it will initialise the thread and then call run()
(6:37:07 PM) cyberdeen: u get it now abi...?
(6:37:23 PM) adeniranope: why can't u call start() straight and have a run method inside it
(6:37:38 PM) cyberdeen: i dont get u?
(6:38:48 PM) adeniranope: what i'm saying is instead of having a start method inside it and calling it ... why not override the run method of a thread and call start()
(6:39:31 PM) adeniranope: like this
(6:40:15 PM) cyberdeen: ?
(6:40:26 PM) adeniranope: new Thread{
public void run(){
balalalalalalalalalalalala
}
}.start();

(6:40:47 PM) cyberdeen: which is d correct version i sent to you
(6:41:20 PM) cyberdeen: new Thread() {
public void run() {
busiLayer.doRegister(url);
}
}.start();

(6:41:23 PM) adeniranope: ok i never took time to check it

(6:41:44 PM) adeniranope: yes it will work
(6:41:54 PM) adeniranope: dat will work
(6:42:08 PM) cyberdeen: dis conversation shud be posted where java guys can see it...i will blog about it right away...

Tuesday, June 10, 2008

What do we do?

Concerning the offer by a member of Jand, Please vote on the right side and leave your comments here.

Thank you

Monday, May 26, 2008

Version Control : Netbeans beats ‘em all

Although most of the time I do sole-development….I still use version control a lot…my tool of choice is mercurial and i’ve been using it for quite a while now….i do all my version controls at the command line…and I am quite happy…or so I thought….Sincerely I dont know when the version control was introduced to netbeans…but I was perusing through the menu and I saw it..I played with it a little and more than I expected Netbeans blew my mind…

First every of the commands I issue at cmd prompt are now visually represented and all I have to do now is click and go.

Next…My outputs are now by far better than what it used to be…the outputs are now well arranged so I dont have to look for where what is and what is not.

And this is what blew my mind…Now as I write my code I can visually see what has changed since my last commit, what has been deleted, what has been added etc….the developement team of Netbeans had really done a good job..the colouring scheme is superb too..like red arrow points to where line has been deleted…green stripe says new lines have been added…blue says lines have been changed…pointing the mouse also gives u a tool-tip of what the color means….and again visually I can revert these changes by click of a mouse…

Finally, Netbeans supports three of the most popular versioning systems, Mercurial, CVS and Subversion….

If you take versioning serious in your development process, you just need to try out the versioning system built into Netbeans..and as usual..there is no Rocket Science involved in using it…it takes only a few minutes even if you have not used version control before

Netbeans….My IDE of Choice

Saturday, May 10, 2008

Code, Chat and Share: With Netbeans...coding can't be easier

There's this cool feature in Netbeans I just discovered...it is called Collaboration...it comes as a plugin. So what does it do.

First I go to the plugins page and I install the Collaboration plugin...just 4MB.
Next I see a new Menu appear on the Menu bar called Collaboration in between versioning and tools

I click on the Menu and it gives me options to Login or end my session if I am already logged in
Next I click Login and I have a side-bar where I can Manage my accounts.

I click on the Manage Accounts button and I have a new window where I can
  1. Register for a new collaboration account with share.java.net
  2. Register for a new collaboration account with another collaboration server
  3. Access my already created account on any collaboration serve
Any one who can install netbeans should be able to follow the simple steps to create a new account

After your account has been created your side bar is update to reflect your account settings. You can change any of these when you click on Manage Accounts button. if you are satisfied..click login
By now I guess all your friends have also done the same thing...so how do I add my friends to my contact...or better still how do two developers working on the same project collaborate real time without actually having to open an Instant Messaging Application? Some times ago I wrote about how Netbeans has helped me to eliminate most of the other GUIs that floods my screen...and now I have only one unified GUI...now its helping me to eliminate multiple Instant Messengers too......life is beautiful with netbeans

Now right click on Contacts in the collaboration side bar and select Add Contact..type your friends first name and click find..if your friend is logged in...he will show on the open and you can add him..a message is sent to your friend too to add you....you have fufilled the first step to real time collaboration

Next right-click on your friend's ID and click on Start Conversation...a new tab is opened for you where you can chat, share files and even share a whole project!

Now click on a file..drag it to the window that says Drag files here to share them and blam!...you have started sharing...your friend at the other end recieves the file(s) you dropped.....this way you can drop a whole project here and the guy at the other end gets it......He can also do something really crazy at this point...he can remotely build, clean, and run this project

Go try out this cool tool...you'll be glad you did....I did something with this tool...At a time I have a server setup that I manage remotely...most times when I make changes...i do it on my development system and upload...

What I did now was to install Netbeans on my Server and upload all the project files to the server...Next I created another account for the server on Collaboration and then I do all the editing I need to do directly on the server....all I did was shared the project files and that is all...whenever I want to run the project..I connect to the server using VNC Viewer to see the output.

Thursday, May 8, 2008

Every one wants to be on stage...even bugs

I just read a post by Lukas Hasik ( http://blogs.sun.com/lukas/entry/failed_demos_at_javaone ) talking about failed demos at javaone and already we have three failed demos....the question that raised is dis...why did the bugs all want to appear at the presentation time? No matter how much QA u do..u cant seem to get a bug-free code and at presentation they all keep coming up....well i guess this blog answer that.....Let me know what you feel ok?

Building Java FX using Netbeans 6.1

For some of you using netbeans 6.1 and having problems with Java FX, here is the solution....first you can't find Java FX under plugins as is usually the case with 6.0.1 and older...The reason for this is that the Netbeans beta update URL is set to 6.1 and you have to manually change that...instructions to do that are available here

https://openjfx.dev.java.net/javafx-nb60-plugin-install.html

I also found this site on the netbeans plugin portal http://deadlock.netbeans.org/hudson/job/JavaFX_NB_daily/ i guess the claim this secondlink is d 6.1 build of JavaFX(I've not tried it)

But if you like to play with the raw source like myself...here is what to do....

  1. Download the latest source from https://openjfx.dev.java.net/source/browse/openjfx/ using svn
  2. If you want the tar.gz format use this link https://openjfx.dev.java.net/servlets/ProjectDocumentList
  3. After downloading the source.....open Netbeans and select Open Project
  4. Navigate to the folder where jfx is download...Netbeans sees the folder as a Netbeans Project...Open it..Netbeans will complain of some dependencies files missing....just ignore it
  5. For some GodKnowsWhat reason..this project does not build successfully under Netbeans..You need to make some changes to the bootstrap.xml file.
  6. Open the folder where jfx is downloaded and open the file bootstrap.xml with your favourite XML editor (which I guess is Netbeans..I use Netbeans)
  7. On the navigator tab you will see Ant Targets...double click on ant..Netbeans automatically points you to the target ant
  8. Put a comment on lines 93 to 98 (use html comments).
  9. Now download the latest ant build from http://www.apache.org/dist/ant/binaries/
  10. Extract the contents to $JFXFOLDER/bootstrap/ant-1.7.0/ where JFXFOLDER is d folder in which you have your jfx files
  11. Next create a folder ant-1.7.0 in d folder $JFXFOLDER/tools/
  12. Now build the project...the project should run smoothly without any problem...it will also download all the necessary files and folders and put them where they should be......
  13. So that Netbeans wont download these files next time I want to build the project...Sorry I cant have XML code in here....mail me to get the modified bootstrap.xml
Now you have javafx compiled and the jar file should be in the folder $JFXFOLDER/openjfx-compiler/dist/lib...you can easily add this to your path so that you dont reference this folder anytime you want to compile a Java FX program...using your own build

Wednesday, May 7, 2008

JavaFX and Applet: Flash got a competitor

Sometimes ago I discussed with a colleague of mine on how this browser incompatibility issue is affecting one of the world's most popular language : Javascript....The conclusion of our discussion is that Flash/Flex will replace Javascript at least for now......I argued however that Flash/Flex can never be ubiquitous. Though some technologies that promises to compete with Flash/Flex are still young and probably immature.....they definitely will be able to catch up with flash/flex considering the big-wigs behind them....The first of these technologies is Silverlight from Microsoft and the Other is JavaFX from Sun Microsystems. The reason for this I reasoned is because the M$ guys will like to go with Silverlight and the Java guys will love to go with JavaFX.....this however I did not see happening anytime soon....as I wrote in http://trinisoftinc.blogspot.com/2008/04/web-30-and-javafx.html talking about web and JavaFX....I mentioned lately in that blog about applets and then I didnot know what was going to hit me at the Sun JavaOne conference......

After the session at the Sun JavaOne conference...and the demos we saw about JavaaFX and Applets...i betcha if flash wants to stay on-top it gat to do something dramatic.....with the new consumer JRE Java 6 update 10....the disparity between desktop and web have been reduced to zero.....you can simply drag and applet to your desktop and blam it becomes an application.....that is the coolest of them all.....i bet I have not seen anything like that(pardon me if it already exists).......The multimedia is awe inspiring....the connectivity is outa this world....the language is mature and superb.

For me I will go with Java or .NET and I will prefer any one of them to Flex....these languages have a super backing...the are matured and they are tested and trusted....flex is still a new language that is bound to go tru so many transistions.....I don't think that kind of language is suitable for the kind of apps I build.

Besides.....No matter how well flash is tinckered with....I still prefer(and I know anybody should) the graphics presentation and multimedia video and audio quality available in Applets + the MPees over flash....JavaFX crowns it all. With the JavaFX backend availability for applets....its best described as Applets on Steroids.....

You can check out the new cool features of JavaFX on www.javafx.com

Tuesday, May 6, 2008

SIP: the future of telephony, the future of communication

Its no more a buzz word...almost every one has heard the word SIP at one time or the other. Recently I started working with SIP and the results and insights I got are innumerable. I found out that there's nothing http:// can do that sip:// can not..and even more do.

I have posted here some of the areas where SIP is a considerable technology and where I see SIP perform far better than HTTP.

First of all, when most of us hear SIP..what comes to mind is VoIP...SIP != VoIP. Its a delusion to even think both are of the same family. VoIP is just one of the things you can do with SIP....its like a subset of SIP and its not equal to SIP.

So what can SIP do...or better still what can I do with SIP...this list is actually far from beign comprehensive..but its a good place to start..
For those who dont know..we have software,malware,bloatware,spyware,M$ware etc....compared to SIP, http is a bloat ware. I use SER and I also use Apache I want to say that my LSAM (Linux Sip Applet Mysql) applications performs better in terms of speed that LAMP(Linux Apache Mysql PHP)...The problem of LAMP is TCP..The Strength of SIP is UDP...I dont have to use the problematic TCP/IP protocol...

Except for the issue of firewall(which has since been solved by SIP proxies) UDP in my own opinion is better than TCP/IP again in terms of speed...whenever I develop apps especially in java, I prefer to use UDP than rely on TCP...i have to write my own failure-to-deliver protocols yes...its better that way aint it?

One area I am most impressed is in the area of Instant Messaging...with Ajax and PHP over TCP/IP...using two systems connected on my LAN we still noticed a kind of lag when chatting....with SIP....its like the message is already sent waiting for you to press enter before appearing on the other person's screen.

When connecting to SIP, its like magic....even on my LAN...some pages take close to 30secs to load...i.e if the page did not have much images and flash animation....streaming multimedia on my LAN using TCP/IP is another story...on a Intel Pentium M 1,36 GHz processor, 1Gb of Ram and 160 Gb of hard disk..we cant have more than a few connections(less than 50 to be precise) before we notice that the server is already crying for more resources....for SIP we use a Branded Pentium 4 System, 512 of RAM and 40 Gb of Hdd and the number of concurrent calls(including video messaging) goes to about 1800...I see SIP Streaming Servers replacing bloatwarez like Adobe Flex Server*
So in the nearest future I see SIP totally taking over
  1. Instant Messaging
  2. SMS/MMS
  3. Multimedia (Audio && Video)
  4. Webcasts (Live TV)
  5. Presence
  6. VoIP
  7. Every form of Data Transfer
  8. Telephony
  9. Community Portals(Messaging, Collaboration, Presence)
  10. Web Operating Systems
  11. Languages like CPL becoming more popular
  12. Switching Technologies
  13. Scalable Web Apps etc
Well..after all said and done...SIP Rules...I think developers should begin to fine tune their minds to develop apps for the platform that promises to be the technology of choice as far as communication is concerned.

*Adobe Flex Server is a super product please dont get me wrong...but at the same time its trangressed against the rules so...its a bloatware

Wednesday, April 30, 2008

Web 3.0 and JavaFx

I am of the opinion that Java Fx has a big role to play in web 3.0... According to Sun's Boss Eric
".........But if I were to guess what Web 3.0 is, I would tell you that it's a different way of building applications... My prediction would be that Web 3.0 will ultimately be seen as applications which are pieced together. There are a number of characteristics: the applications are relatively small, the data is in the cloud, the applications can run on any device, PC or mobile phone, the applications are very fast and they're very customizable. Furthermore, the applications are distributed virally: literally by social networks, by email. You won't go to the store and purchase them... That's a very different application model than we've ever seen in computing."

My emphasis is on mobile phone. The java fx mobile framework i believe will leverage so much on the already existing j2me JSRs(especially the mobile game APIs) to provide rich, affordable contents to mobile phones. Although we have Flash&Flex, Microsoft&Silverlight and Android, I am of the opinion that JavaMe has a stronger foothold on the mobile world than any of these technologies and if my presumption is right, javafx mobile will sit pretty atop J2ME to provide contents that are rich and affordable....

Although JavaFx for CLDC is yet to be fully functional, I definitely believe Sun is having some kittens in their cupboard which I am of the opinion they will let us see at the JavaOne conference. I also see a future of JavaFx for other portable devices running CDC and if all went well, JavaFx might as well be called Applet 2.0 for the Web End.

Thursday, March 27, 2008

You dont believe pascal can do this

For pascal addicts, I got a solution for you. You never believed pascal can do this. Pascal as we know it

Program helloWorld;
var
wetin : String;

Begin
wetin := 'Hello World, Hello Birds';
writeln(wetin);
readln;
End.

Please compile this code for me, I can't seem to locate my pascal compile again!

U are actually wondering what is all this about? ok wait

if I told you that pascal can be used to develop mobile applications (J2ME/MIDP) will you believe me? probably not. and I dont blame you do I?

Yes u can actually build MIDP apps with pure pascal. and if you know java, Hurray, God have mercy on your soul.

In case you think this is april fool, I av included the link where you can download the IDE (Yes the IDE) where you can develop your mobile apps using pascal. The site also got some interesting sample apps including dave!

Now I dont want you to drop your php and spend the next five weeks developing mobile pascal okay?

http://www.midletpascal.com/downloads.php

Monday, March 24, 2008

Doing Ruby on Rails with Netbeans 6.1

[The Images I used cant fit in here so if u need the original tutorial with images in pdf format, contact me and I will mail it to you Free].

Doing Ruby on Rails with Netbeans 6.0

I came across a book on RoR titled Railspace. A very good book for both starters and professionals. The book however relies heavily on the ruby command line to perform many of its tasks. I am using this opportunity to try to create a walk through the Ruby Application Framework support of Netbeans 6.1 beta. Its really cool seeing Netbeans do so much of what I will normally do in ruby console. It really saves me time by not making me repeat myself (DRY).

To start with, Install the Netbeans 6.1 IDE (you can get it from sun's web site). This automatically installs Jruby and other things you need to build a RoR application. Surprisingly, that is all you need, no other PlugIns, no other applications, nothing more. Just this wonderful Netbeans IDE, isn't that a very beautiful place to start from? I have seen tutorials where I have to install virtually everything on the Internet before I could make it work, but for RoR on Netbeans; all you need is Netbeans IDE.

After Installation, You are ready to go, follow these simple steps
1.Start the Netbeans IDE (if you have not already done so). Below is a screen shot of the IDE.















2.Click on File and select new project.













3.Under categories, select Ruby, and Under Projects select Ruby on Rails Application.

4.Click Next.

5.Specify the options as appropriate on this page. The most Important option here is the Project Name and Project Location. Leave other options in their default values.

6.This tutorial assumes you already had a hands on experience on RoR, so you should know the importance of this page and you should already be excited at what this will do for you. Netbeans has in-built database drivers and so on this page, if you want Netbeans to create a the databases you need for RoR for you just pick New Database Connection under any of the databases and specify the parameters as appropriate. I don't need to tell you how to do this except you are a newbie to computers and programming, which means this tutorial is not for you. But if you already have a database connection and you have created a database then use the Specify Database Information Directly Option. I used the first option and here is one screen shot for you. The basic settings are enough for you at this stage. If you like you can explore the Advanced settings though. Make sure you have created the database called oneclassmate.

7. Click next and ......let sleeping dogs lie by clicking Finish

You have successfully created You first RoR Application. Allow some time for Netbeans to create your Directory Structures. The first thing you notice is that Netbeans have run rails command for you. Yes you don't have to run rails from the command line again. Never! and database.yml must have also been created for you. That is good news ain't it? As from now on the rest of this tutorial is just a matter showing you what you would have seen if I had given you some time all by yourself.

8.Next, run the project by pressing F6 on your keyboard or clicking run on the IDE. This will open a web browser automatically and here's what you should see on the browser.

Try some or all of the links to see what they do[This is not a RoR tutorial, remember?].


We are almost done, now lets see how you do some basic tasks using Netbeans
1.Generating a controller
a)Right click on the project and click Generate...... This open a page where you have options to generate so many things, you can see them for yourself cant you?
b)To generate a controller, make sure controller is selected and type the name in the text box provided for Name. To generate actions for the controller, type a space after the name of the controller and type the action(s) also separated by space. See the screen shot below. You can also generate Views(optional). There are also other options on this page to make life easier for you.
Don't be afraid, try them out ok? After clicking OK, three very important files among others are created for you
1.the controller you just specified
2.the helper file for this controller
3.the test file for this controller
Don't forget to always look at the output panel below your screen you have very important information there. Don't forget to look at the left hand panels too, there you have your directory structures. For those who don't know, your views are found in the Views Folder (lol).

2.For command line lovers, you can still run the Rails Console just right click on the project and pick Rails Console, the console is opened on the output panel, here you can type your commands and do stuff you know! And for those who love the Ruby shell, yes we have that also in Netbeans. Click Window menu ==> Select Other ==> select Ruby Shell (See screen shot below). The console is also opened on the output panel.
3.You can also run any Rake task you want to from migrate, to testing, to create, to drop, to rollback just about any Rake task you know (and the ones you don't know!). Right click on the project again, pick Run Rake Task and you have all the rake tasks there are. You can also run debug on any of these tasks by selecting debug rake task. The beautiful thing is that Netbeans uses Action-Aware-Menus. You recent actions are listed at the top so you have them close by.

Well this is as much as my hands can type for now. You need more help, mail me or call
segun@accessng.com
2348089370313

Thursday, March 20, 2008

Mobility

Dont let the title of this blog mislead you. Yes Java Rules, but we are talking about J2ME. Here we are not out to damn anybody or any language but to promote the Java Mobile Edition. We will discuss the trends, the downs, the ups, wot we need to see added, removed, code snippets, etc. This is meant to be a useful blog arena, you are welcome on blog.

Java indeed Rules aint it?