Gmail Calendar Documents Reader Web more »
Help | Sign in

Seun Osewa

Programmer, Webmaster at Nairaland

Seun Osewa - Buzz - Public - Muted
In Java, you can't compare number objects of different types. You can compare a Double with a Double or an Integer with another Integer, but you can't compare a Double and an Integer. Trying to work around it only causes more problems, so I'm going to stop doing that. Would like to finish iterlib as quickly as possible. It needs to be good enough to use in a project.
Ayodeji Aladejebi - new Integer(new Double(54.0).intValue()).compareTo(new Integer(54)) ?Mar 9
6 more comments
Ayodeji Aladejebi - Every Number Object in Java [Long, Integer, Double] can be converted to any native type for which u can base ur comparison.
The one I pasted earlier is to compare Double and Integer

Compare Double And Long
new Long(new Double(54.0).longValue()).compareTo(new Long(54));

Compare Long and Double
new Double(new Long(54).doubleValue()).compareTo(new Double(54.0));

Compare Float and Double
new Double(new Float(54.0).doubleValue()).compareTo(new Double(54));

have yu heard of Comparable Interface as well, yu should use it craftily to make your compare terms?
Mar 9
Seun Osewa - Wow, your first code comment; thanks. I hope we see more!

Yes, that was the workaround, basically: converting to a common type before comparing. The problem is that, for a library, you don't know the Number types in advance, so you can't select the ideal common type for each case. I tried using doubleValue() since it covers many cases, but there are many Longs that can't be converted losslessly to Double. BigDecimal covers most cases, but the performance won't be Java-like.

So I asked myself a question, "how frequently do Java programmers add Integers and Doubles to the same collection?". I'm guessing the answer, for this same reason, is "never". So now, just like you suggested, I'm using <E extends Comparable> which works for both numbers and objects (was using different routines for numbers previously).
Mar 9
Ayodeji Aladejebi - "you don't know the Number types in advance"...are yu working with Number Type directly? or yu are working from parse-eable stringsMar 9
Seun Osewa - I was writing a set of generic methods that can be used to find the maximum and minimum number in any sequence of numbers, regardless of type.

Now it's a set of methods that can be used to find the highest and lowest values in any Sequence of comparables of the same type e.g. a list of Integers or a set of Strings.

See max() and min() and the code commented out at:
http://code.google.com/p/iterlib/source/browse/trunk/iterlib/Reducer.java?r=7
Mar 9
Ayodeji Aladejebi - so yu think next and max might be different types while comparing?Mar 9
Seun Osewa - Yes. e.g. if someone passes Arrays.asList(255, 7.5, 3.5f, 2000000L).Mar 9
Ayodeji Aladejebi - i will just suggest that the best bet is to flatten them to a common and base ur comparison on that.

am just imagining a function max($20,700Naira, 443Ceddis, 89Yen)

double is native and good but For me i would use BigDecimal.
Mar 9
Comment
Like
Seun Osewa - Buzz - Public - Muted
When I first got online, I was paralysed as a programmer because there was a corresponding open source project for every product idea I ever had. I didn't want to reinvent wheels, and I didn't want to become a "software customizer", so somehow I stopped programming and dabbled into blogging and eventually ended up with Nairaland. These days, if I feel like writing some code, I'll write it first and google it later. It's a lot more fun that way. Life is too short.
Ola White - Lol...."I'll write it first and google it later" that's a nice way of NOT killing ideas, to be frank, no new concept on internet/world, we are just polishing them...Mar 9
Mayowa Akinyemi - There was a time when I too was stuck in that particular rut... my solution was to seek out even more complex challenges in a bid to become a "prima donna" of some sort...
Now I'm content to add a unique spin to a general problem and make money. But I dream of retirement when I can go back to being an Inventor rather than a code monkey in a business mans suit...
Mar 9
Comment
Like
Seun Osewa - Buzz - Public - Muted
Like Scientists, inventors like to learn about how the universe works.
Unlike Scientists, inventors only care about theories with real-life applications.
Like Engineers, inventors like to use scientific principles to solve problems.
Unlike Engineers, inventors don't build finished products. They build prototypes.
Tim Akinbo - Haha. Nice one and I do agree although I'm not sure where I am with the last point.Mar 8
28 more comments
Mark Essien - I agree. And I think I would consider myself an engineer then. Or I would like to be an engineerMar 8
Tim Akinbo - How do engineers compare with scientists?Mar 8
Seun Osewa - Unfortunately for inventors, prototypes have to become polished products before people will fully appreciate their worth, so they have find a way to sell or give away their inventions (patents, research papers, open source) so others can use them, or switch from inventing to 'regular' engineering in order to profit from their inventions.

The former route is hard because you have to watch people making lots of money off your work while you make nothing or, at best, relatively little. The later route could make you really rich, if you're lucky, but what if you don't derive any personal joy from it? What if you only enjoy coming up with new ideas and proving that they work?

@Tim Akinbo I think engineers use scientific discoveries to build solutions to real life problems. (technically, inventing is probably just a part of engineering)
Mar 8
Andy Onyung - Actually, scientists look into the future while engineers live in the present.
Scientists seek to establish what is possible while engineers try to build the possible.
Mar 8
Tim Akinbo - @Seun Osewa I thought so too (re: similarities between inventors and engineers). "What if you only enjoy coming up with new ideas and proving that they work?" Then keep coming up with new ideas and proving that the work! As for becoming rich with your ideas? Get someone who enjoys using proven ideas and turning them into profit and partner with him - that way you'll also be rich.Mar 8
fritz ekwoge - To all those who always end at prototypes:

To finish first, you must first finish.
Mar 8
Mambe Churchill Nanje - If this is @Seun Osewa way of consoling himself then I am not in support. I dont buy the idea...every inventor has the power to be an engineer...but just too lazy to be.Mar 8
Ayodeji Aladejebi - ...While Businessmen justs hires all of them for some good profit :)Mar 8
Mambe Churchill Nanje - @Ayodeji if the business man is not having "inventor" and "engineer" characteristics...I am smiling at his/her failure ;)Mar 8
Ikuseru Akin - Each one of them have their place in the advancement of the world. Appreciate that y'all.
I wonder what an engineer would have to work with without the repeated failures and doggedness of the scientist. Give them some credit!
Mar 8
Prosper Onogberie - Naaa business man don't need to be an engineer or have 'engineer character'....look well....History never lies...John D. never was any engineer...he was just a meticulous bean counter always looking for ways to maximize profit and knock the competition in the head....Branson I don't think was much and engineer selling student magazine and then records and then from leisure trips took advantage of stranded passengers to start an airline....Mar 9
Seun Osewa - edited

Thanks for sharing your insights. Some people can't grasp what we're talking about. 'Success' is good, but once you have reached some financial targets, you need fulfilment too. Self-actualization. You need to do what you really enjoy.

@Mambe Churchill Nanje consoling myself about what? my excessive success? 'failure' at what? let's not lose touch with reality here. you too @fritz ekwoge. please respect the pecking order :-)

@Tim Akinbo nice suggestion; I think I'll follow it. The problem with the second part is that business people love using good ideas, but they really hate paying for them. Novel ideas are like magic tricks; once you understand them, they don't seem so special anymore. Even if you have a patent, they won't pay you until you sue them in court and win the case. They feel they are doing the 'real work'.

Here's how the game works: when you discuss the idea with them, they'll tell you it won't work. So you build a prototype which proves it works. They'll be like wow, let's examine the prototype. Then they'll say they are no longer interested. 6 months later, they'll release the exact same product, and pretend they don't even know you.
Mar 9
Prosper Onogberie - ...Mar 9
Ayodeji Aladejebi - @Seun you have to realize that what some people really really enjoy about the universe is making money. :) and btw not all inventions are scientific or coding..some inventions are also business strategies, social or even spiritual :)Mar 9
Seun Osewa - @Ayodeji Aladejebi I understand that some people enjoy making money more than anything else. Like Jews in movies, etc. :-) But do they really have to label the rest of us as 'lazy' and 'failures' just because money alone can't satisfy us?Mar 9
Seun Osewa - Update: True talk on the bit about not all inventions being scientific. Wait, wait a minute, spiritual inventions? Please tell us more about Spiritual inventions!!Mar 9
Mambe Churchill Nanje - Hey guys I want us to look at what Seun is saying. what is the difference between a Software inventor, software engineer and software business man ?? he who wants to seperate software inventor and engineer is the person thats shying away form work. Steve Jobs is he inventor or engineer or both. I personally think every engineer is an inventor...FULLSTOPMar 9
Ayodeji Aladejebi - @Seun Osewa There is a vast difference btw "money" and "making money". they are different. To make money, yu also need a measure of generosity. Meanwhile Seun, not all the ideas in your head is yours alone. Also not all the money made from your idea is yours. Which is why there is a strategic business invention called 'Partnership'. It is an invention that brings people who enjoy making money with people who enjoy inventing(like yu) to make the world a better place so that those ideas in your head wont go the the grave with you. :)Mar 9
Mark Essien - I believe that the only real test for an invention is to see it in the real world doing something useful. A person who says he invents, but never tests it in the real world is doing absolutely nothing - look how many people have invented machines that "run" without any power source.

When you "invent" and you never test it in the real world, you have no idea if your product fits the needs of users. Famous inventors are famous because they invented stuff like the lighbulb or the airplane - things that significantly ease the troubles of normal people. All those university professors writing papers - they can write all they want, but how many Facebooks came out of these papers?

Not having your product out in the real world is not being a scientist - it's being afraid of criticism.
Mar 9
Prosper Onogberie - ...Mar 9
Ayodeji Aladejebi - @All Tomorrow we will not be inventing but marching to Aso Rock. Drop all your laptops and hard disks for tomorrow we March for victory!Mar 9
Mambe Churchill Nanje - @Ayodeji but I am not Naija born ooh ;)...so I am exemptedMar 9
Ayodeji Aladejebi - @Mambe you do business with naija so i guess yu have stake in our progress :) join the teamMar 9
Mambe Churchill Nanje - @Ayodeji yeah you right...I didnt think of thatMar 9
Mark Essien - March for what? What do you want Aso rock to do for you?Mar 9
Prosper Onogberie - To Impeach Yardy I guess...Mar 9
Seun Osewa - @Mark Essien I too believe that inventions must be tested in the real world. That's what I mean by "prototypes"; I guess I didn't make that clear. By prototype, I mean a basic implementation of your idea that works as intended. A prototype may not be so pretty, but I think it has to work to be considered successful.Mar 9
Mark Essien - In that case, then it is a good thing. You mean make something that works, that people love, but not have to deal with all the marketing and business crap that accompanies making a lot of money from it?Mar 9
Seun Osewa - Yes.Mar 9
Comment
Like
Seun Osewa - Buzz - Public - Muted
Introducing iterlib, a library that makes Iterators and Iterables fun to work with in Java. It's primarily inspired by python's extensive library of user-friendly iterator functions. E.g. to find the smallest number in a list of numbers after skipping the first 5 numbers: Iter.wrap(mylist).skip(5).min() or myIter.skip(5).min(). To find the sum of a list of numbers: Iter.sum(mylist) or myIter.sum()'. To concatenate a list of strings: Iter.join(mylist, " ").

Visit http://code.google.com/p/iterlib/ to download the Netbeans project
Seun Osewa - This project does similar things, although it's a bit too magical for my taste: http://code.google.com/p/lambdaj/Mar 8
3 more comments
Sachin Garg - Maybe its magical only because you don't understand it yet, and your stuff may seem similar to others? Just wondering.Mar 8
Sachin Garg - Because going by the name of the lib, "lambda expressions" is a fairly well settled concept with similar libs for C++ also very popular. Although I haven't had to use one yet,Mar 8
Prosper Onogberie - nice...I didn't remember the link to go back the other time....Mar 8
Seun Osewa - It uses reflection to do things you normally can't do in Java, so a typical Java programmer won't be able to follow the code. With other libraries, you only have to read the API docs. I feel that if you're writing reflected Java code that other Java programmers won't understand, you might as well write Scala or Groovy.Mar 9
Comment
Like
Seun Osewa - Buzz - Public - Muted
Google and Facebook have an interesting approach to open source: contribute your libraries and frameworks but don't contribute your actual applications. What do you think?
Ola White - Intellectual acquisition...Developers need to be careful... stealing in the air...Oops!Mar 4
8 more comments
Sachin Garg - Free as in speech, free as in beer or free as in drugs? Free isn't always free, take your pick.Mar 4
Ayodeji Aladejebi - why would yu want to do that. Will Google ever open their search engine code for you? Which business man in his right mind gives his core IP out for freeMar 4
Prosper Onogberie - @Deji None!!! But Geeks who just want to play around I suppose would.Mar 4
Seun Osewa - What do they hope to gain by releasing their libraries to the public? Do they expect valuable third party contributions? Or is it just for PR and/or 'doing the right thing'?Mar 4
Ayodeji Aladejebi - a way to help their conscience that they are contributing back to the OSS society. they have made their wealth from open source..so its time to give back and even what they give back make yu more dependent on them :)Mar 4
Sachin Garg - I think a lot of it is just "because we can give it without it hurting our interests".

And it does ties people to technologies google wants to use/promote, making the world safer for them. eg, if you are building everything on java, you dont want java to disappear tomorrow and contributing quality code around it keeps the ecosystem thriving. Especially if you are sizeof(google).

And if we have to think of deeper conspiracy theories, then in early days microsoft was admired as much as google. Then along the way the very people who supported them the most - the developers - started hating them with a passion. It seems google is trying to avoid that from happening by giving away some of their quality code.
Mar 4
Seun Osewa - Excellent perspectives. Is this a big-company-only strategy?Mar 4
fritz ekwoge - My perspective:
Google: I want more and more people to use the internet. Devs build tools that make people use the internet even more. Let's give away some of our stuff to help those developers build even more stuff, making the internet even bigger. Some of the dev tools we use are open in nature, so we can't give them away without risking exposing the code. Why go through the hassle ? Let's open source.

Facebook: First, I'm stuck. Opensource brought me where I am right now. However, some Opensource licences demand that my contributions go back to the community. Also, I want to be seen as a technology company and not a media company, for PR reasons mostly. Let's opensource most of the non-core stuff we use. It'll make us look real tech.

Microsoft: I want devs to build on my platform. I sometimes give away tools for free so that devs can build on my platform, forcing even more users to stick with my platform. Since most of the dev tools I use are closed in nature, I can give away tools without easily giving away the source code.

Yahoo: Can't still figure why I decided to open source YUI.

Conclusion:
Most companies want to give stuff away for free. for PR, to build a better ecosystem for their market, because open source licences demand they open source their contributions etc ... It just happens that some of the dev tools they use are open in nature (think scripting languages like python, php ... and to a certain extend java) . So they opensource.

The small companies too would want to use this strategy. Gives exposure to their company, and their commercial products.
Mar 5
Seun Osewa - Thats insightful. Thanks!Mar 9
Comment
Like
Seun Osewa - Buzz - Public - Muted
Python does a good job of extracting and integrating the more useful aspects of functional programming (function objects, generators/iterators, and functions that transform them).

Most attempts at integrating FP into Java (Scala, functional Java) have, unfortunately, focused on programming with immutable data structures, which are never ever going to be mainstream.

I believe one can write a Java library that implements Python's pragmatic approach to functional programming in Java, while being 100% compatible with Java's standard data structures.
Mambe Churchill Nanje - why would a software developer want to do that ??Mar 4
9 more comments
Seun Osewa - Sweet, straightforward code that mirrors your intent. E.g. Retrieve the forum posts on nairaland. Remove posts in certain sections. Remove posts by certain members. generate a list of tokens that each list contains. Join all the lists of tokens together to create a new list. For each token in the new list, record the number of times it occurs into a map.

With the functional approach, you can write a program structured exactly like that, the way you would solve the problem naturally. But it won't be practical to copy all the posts on Nairaland from one list to another in the name of ease-of use.

In Python, you can use generators (iterators) instead of lists to achieve the same objective. The code will look exactly the same, but will actually process one element at a time, which saves RAM and cache space and, for a problem like this, is practically as fast as crafting a complex, monolithic while loop that does everything.
Mar 4
Essien Essien - One day, you will grok immutability :)

Its one of those things that you either get or no. I used to wonder why jump through all the hoops in Haskell, etc. Untill I began to have assurance problems with simple java frameworks I wrote. Once I began to want to proove that code I wrote was correct once it compiled, i discovered again immutability in Scala and Erlang. Then I grokked it.

Today, most of my other code is written to mimick an FP style kinda.

It reduces programming to its very basics, Data Structures you can trust and State Machines you can proove to manipulate these data strucures. As a plus, you can scale easily...

don't get me wrong... when I want to solve a new problem, I start a python shell by reflex action, but when I need to write a new backend these days, I almost invariably think in 'gen_server'isms, 'gen_fsm'isms and other erlang comforts. its sooooo easy it would be criminal not use it :)

Ahhh... i rant too much :)
Mar 4
Mambe Churchill Nanje - I still ask why make this thing sound too complex when its actually to simple ?? And worse case its not the reason why most software developers learnt programming. We want to make money lolMar 4
Seun Osewa - @Mambe Churchill Nanje:
Simplicity is the point, actually. Truth be told, until this stuff is implemented in Java and tested on Java developers, we won't know for sure whether it's useful in Java.
Mar 4
Mambe Churchill Nanje - @Seun Osewa I use to hate my classmates in highschool because they use to mystify Maths and Further Maths. while I sleep in the dorm, they go about acting like pharisees ... making the whole world know that what they are doing is next to human creation. But the grades were different best came from the person sleeping. What i am saying is programming is not COMPLEX MATHS...its machine instructions for a purpose and my comment is not only from this buzz but from the last few months trend. BTW I am building an experiment that you would love to know when its releasedMar 5
Seun Osewa - @Mambe Churchill Nanje I understand how you're feeling. Git makes me feel the same way. Maybe we're not very good at explaining this stuff, but I don't think that makes us 'Pharisees'.

@Essien Essien I feel immutability is never going to be mainstream because, contrary to the hype, it's not required for concurrent programming. Only objects shared by different threads benefit from immutability. And even for that, you only have to 'freeze' data structures just before sharing them to be safe. I feel: immutable data structures are useful, but not useful enough to be the default option.

I'm working on a library to allow programmers to manipulate iterators and iterables in Java - filtering them, mapping them, slicing them, zipping them. But the library is organized in an object-oriented way because that's what Java supports. I've really enjoyed writing it, but I'm yet to find out how useful it is.
Mar 5
Mambe Churchill Nanje - @Seun Osewa Git makes you feel that way ?? I dont get ??Mar 5
saidimu apale - I found this buzz on a search for "python generators".

I completely agree with @SeunOsewa, my only problem with generators so far is exception-handling. There don't seem to be any good idioms on a pythonic way to do it.

Consider this: with the pipeline you described (on parsing forum posts etc), how would you properly handle an exception thrown by one of the generators? Do you propagate it to the calling function, which effectively "pollutes" the calling function with information about other elements in the pipeline? Decorators may be one way to do it well, though there seems to be no consensus on an effective way to do it.

How do you do it?
Mar 6
Seun Osewa - @saidimu apale Hi! I believe exceptions should be handled as close to where they are generated as possible, which depends on the constraints of the problem.

For example,
1) An end-of-file exception in a generator which reads lines from a file should be caught and GeneratorExit thrown.

2) A generator which parses each line in a log file for analysis elsewhere in the program should probably catch format exceptions and just ignore them.

3) If you need to reuse the generator above for a problem where ignoring badly formatted lines isn't an option, an additional ignore_bad_lines argument could be added to the generator's call signature. If it's false, format exceptions are propagated to the caller. And then you can handle those exceptions at a higher level.

4) In more complicated cases, a function_to_call_on_exceptions argument might work better. Something like 'def function (the_exception).' The function could give you the option of either terminating the generator with an error, ignoring the exception depending on specifics, or throwing StopIteration to end things gracefully.

5) If the exception can only be handled outside the generator, that's ok too.

I haven't used (3) and (4) yet but I've used (1), (2) and (5) many times. What's your approach?
Mar 6
Seun Osewa - @Essien Essien I just feel trying to promote immutable data structures would drive more people awaythan necessary. The way they are implemented in say Clojure/Erlang is really sweet. However, the freedom from concurrency bugs you enjoy can be enjoyed with STM, too, leaving most programs 99% unchanged. I just feel the leap from "multicore is here" to "immutable everything" is too much.Mar 7
Comment
Like
Seun Osewa - Buzz - Public - Muted
One reason Java is great: it lets you write any type of program. Sort-of.
Desktop apps? Sort-of (Swing). Browser apps? Sort-of. (applets).
Expensive algorithms? Sort-of (server VM). Games? Sort-of (JGL)
Web applications? Sort-of (Servlet API and lots of bloated frameworks).

Java never seems like the best tool for the job, but it always gives you a shot.
Ayodeji Aladejebi - it is the best tool for the job if it can get the job doneMar 3
2 more comments
Seun Osewa - True. The best tool for the job is the one you can use best. ;-)Mar 4
Ayodeji Aladejebi - Casandra was built with javaMar 4
Seun Osewa - Yeah. Java is the biggest open source platform, in many ways.Mar 4
Comment
Like
Seun Osewa - Buzz - Public - Muted
I couldn't find a simple and effective todo-list & reminder application, so I wrote mine. It works.
Ola White - Share yours....Try http://rememberthemilk.comMar 3
Seun Osewa - Sent a copy to http://twitter.com/olawhite . Hope that's you?Mar 3
Ola White - Yeah! that's me and I got it....checking on it right now! thxMar 4
Comment
Like
Seun Osewa - Buzz - Public - Muted
The Punch website is likely to overtake Nairaland traffic-wise next month. 234next is following closely. Check out their growth trajectory; wow! I dey sidon look like Amodu. Kudos to them.
1 person liked this - Oluniyi Ajao
Ayodeji Aladejebi - its yaradua that caused itMar 3
6 more comments
Prosper Onogberie - Very temporalMar 3
Seun Osewa - I sure hope so. If hyping the non-crisis is what it takes, let's do it!Mar 4
Francis Ibikunle - Seun, you need to act fast, I would advise you begin looking into investing on paid advertisement on search engines and social media sites before your competitors start. Google spends an average of $100,000 USD daily to remain Number One.Mar 7
Prosper Onogberie - I don't think there's any cause for alarm jo....they are a news company and this is a trend of the times...all Nigerians abroad want to get news from the Nigerian news companies so their traffic is very likely to go up....they don't have a romance section like nairaland and even nairaland has more up to the minute news than they as a result of free solicited journalists in nairaland.....abegii nothing dey happen...Mar 7
Ayodeji Aladejebi - i dont see the basis for which a social forum will compete with newspaper online. i think the objectives are different.Mar 7
Prosper Onogberie - @Deji I agree too jare...Mar 7
Francis Ibikunle - Thank you guys for your quick response.
In 1981, Bill Gates said "640K of memory should be enough for anybody", because he did not see the basis why a computer should run on terabytes of memory.
Mar 7
Comment
Like
Seun Osewa - Buzz - Public - Muted
1) Google is one of the 3 websites most visited in Nigeria.
2) Raw traffic aside, Google also enjoys the unique privilege of knowing what most of its users are interested in buying at any point in time. Through their searches.
3) Their bidding and ad placement system ensures you get the best bang for your advertising buck. If used correctly.
4) The google content network can display your banners on hundreds of Nigerian websites.

In light of the above facts, I don't understand why some big companies shy away from Adwords.
Collecting money for direct ads when they would get more value from Adwords is like cheating?
2 people liked this - ShowFisayo Sanyaolu and Cellimmunity.com ~ Paul Burdett ~
Prosper Onogberie - I believe you strongly.
However if Nigerian developers who are the conduit between Nigerian businesses and Adsense knew how these things worked properly. I think they'll sell it better to their clients and even make more money as a result of performing ads.
I for one would like good tutorial on how I can make my ads show up on Nairaland and pucnhng or some other Google adword Nigerian site.
Mar 2
Idris Dosunmu - Its a Nigerian problem. People generally in Nigeria do not understand how the web works or how it can work for them. They only pretend to. Add that to the fact that anything internet is generally categorized under 'ICT' which unfortunately is just a buzzword through which smart proposal writers make big bucks.

Its people like us who can really do something about... like get a real tech column in a National Daily to educate the masses.
Mar 2
Comment
Like
Seun Osewa - Buzz - Public - Muted
“It’s great! If I want to implement a new feature, I don’t need to have commit access at all. I have my own private copy of the repository, so I can write the whole thing by myself. I commit changes to my private repository as often as I want until it’s all finished. Then I can present the whole thing to everyone else.” This user is describing a great convenience, but I view it in a slightly...
Expand this post »
Ahmad Mukoshy - Nice one! ;)Mar 1
15 more comments
Seun Osewa - Thanks. Hope you noticed the link to the source of that snippet?

I'm experimenting with a setup that simulates a DVCS using 2 SVN repos: a local repo and a remote one. I can make changes to the local repo and send them to the remote repo occasionally. The funny thing is that I'd rather make all my changes on the remote repo. It feels more satisfying and makes my project seem more active.

One feature most DVCS's have is the ability to track changes spanning multiple files, renames, etc. The funny thing is that central VCS's can easily adopt this feature.
Mar 1
Ahmad Mukoshy - I really love this bomb thing, but surely its always better to commit progress to the repos for a collective project. ;)Mar 1
Essien Essien - uhhh... its also called dropping a bomb in mecurial, git and every other DVCS community out there... generally in opensource no one likes a dropped bomb... just check the linux kernel archives for what happens to ppl that try to merge those kind of projects back into the mainline... they generally give up or rework the whole thing. this is not a tooling problem... its a personality problem... you can bomb drop with svn, git, mercurial, anything.

The thing that makes DVCS and git in particular fantastic for me, is that fact that i can use the pull head, rebase branch, merge master, push master cycle. its hard to explain. you either get it or you don't.

you generally have to understand the mindset of a tool to appreciate it. else, you end up using it like a tool you're already used to and miss the entire point. :)
Mar 2
fritz ekwoge - I've been evaluating subversion vs dvcs for some time now. I've recently settled with DVCS, especially Mercurial.
The number one selling point for DVCS in my case are local commits. This solves the problem of network issues, and allows me (and my future devs) work at home conveniently.
The number two selling point for DVCS in my case are github and bitbucket. Eliminates the pain of setting up a repository that is available to a geographically dispersed team. They also add other stuff like issue trackers.
Why mercurial/bitbucket then, and not git/github ? Mercurial looks easier, and has better windows support. I'm more of a linux guy. But I don't want to force my future devs to work solely on linux.
Nothing stops a dev from "dropping a bomb", even with svn. I believe this is more of a disciplinary issue, rather than a tech issue.
Mar 2
Seun Osewa - I agree that discipline is an important factor in preventing "patch bombs", However, a DVCS gives you the psychological satisfaction of having "committed" your code without actually making it available to other members of your team for review.

I wish I could have a VCS with GMail's flaky connection mode. That is, when you're connected, commits go directly to the central repo and when you're offline, commits are made locally. When you re-connect, all your local updates are synced automatically. Combining SVN's simplicity with the robustness of a DVCS. What do you think?
Mar 2
Mark Essien - What's the difference? You commit with 'commit', and when you say 'push' and there is no connection, it stays local. You continue working, trying regularly. When there is a connection and you 'push', it's onlineMar 2
fritz ekwoge - /*
"Combining SVN's simplicity with the robustness of a DVCS. What do you think?"
/

Short answer: I think you're describing mercurial then.
Granted, I've only been using hg for a few weeks now, so all I see are the good sides.

/

"However, a DVCS gives you the psychological satisfaction of having "committed" your code without actually making it available to other members of your team for review. "
/

I guess you should have read hginit.com. If not here is a quote that I feel is particularly relevant in this discussion (src: http://hginit.com/00.html) :

/*
BEGIN QUOTE

Question 1. Do you write perfect code the first time?

If you answered “Yes” to question 1, you’re a liar and a cheat. You fail. Take the test again.

New code is buggy. It takes a while to get it working respectably. In the meantime, it can cause trauma for the other developers on the team.

Now, here’s how Subversion works:

* When you check new code in, everybody else gets it.

Since all new code that you write has bugs, you have a choice.

* You can check in buggy code and drive everyone else crazy, or
* You can avoid checking it in until it’s fully debugged.

Subversion always gives you this horrible dilemma. Either the repository is full of bugs because it includes new code that was just written, or new code that was just written is not in the repository.

As Subversion users, we are so used to this dilemma that it’s hard to imagine it not existing.

Subversion team members often go days or weeks without checking anything in. In Subversion teams, newbies are terrified of checking any code in, for fear of breaking the build, or pissing off Mike, the senior developer, or whatever. Mike once got so angry about a checkin that broke the build that he stormed into an intern’s cubicle and swept off all the contents of his desk and shouted, “This is your last day!” (It wasn’t, but the poor intern practically wet his pants.)

All this fear about checkins means people write code for weeks and weeks without the benefit of version control and then go find someone senior to help them check it in. Why have version control if you can’t use it?

END QUOTE **/
Mar 2
Essien Essien - Seun... you have just described a DVCS with automatic merge conflict resolution (which will never be 100% accurate and will still need human intervention) :-), once you start trying to solve those merge conflicts, you'll end up with something very eerily resembling git, mercurial, darcs, etc...

Greenspuns 10th Law: "Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified bug-ridden slow implementation of half of Common Lisp"

Essien's 101th Law?: "Any sufficiently complicated Centralized VCS contains an ad-hoc, informally specified bug-ridden slow implemenation of half of a Distributed VCS"


Hey Mark! :)
Mar 2
Mark Essien - I agree with my namesake, having your local commits auto push would cause a lot of merge problems at a time when you are not in the mental mode of having to work through these issues. Hey Essien^2, hope all's good with you!Mar 2
Seun Osewa - @Essien Essien actually, no. As I imagine it, the changes would only be pushed silently when there are no conflicts. If there are conflicts, then a helpful window should popup to help resolve the conflict.

Compared to a typical DVCS setup, the VCS I'm proposing won't let you go out of sync with the central repo whenever you have Internet access. (With a typical DVCS, you have to consciously remember to push. That's just not going to happen very frequently). When you commit and you're online, it'd behave exactly like SVN.

And unlike SVN, it would allow you to continue committing to the repo when you're offline without changing the way you work at all. And when you come back online, it will immediately try to merge your updates automatically and prompt you if there are any conflicts. It favors gradual refactoring.
Mar 2
Mark Essien - This seems to me like it would be pretty easy to implement - just write a scheduled python script that called git push on a fixed and regular interval - for example every 5 minutes. Parse the console output, and if it says there was a conflict, the script pops up a message. Then you can forget about the 'push' step and only 'commit'.Mar 2
Seun Osewa - You're right. One possible problem: you can't force people to install the script, and it's in human nature to want to make things perfect before revealing them to the world.

A script that adds the offline commit feature to SVN would more likely work: if people choose not to install the script, their commits will still go to the central server.

The script would work by pushing changes to a local svn repo when the server can't be reached, and syncing them using SVN commands when the server comes back online.

So one could continue using SVN in hopes of writing that script when actually needed?
Mar 2
Essien Essien - @Seun Osewa there's just one thing wrong with this work flow... there are no branches!!!

The thing is... if you use stuff like svn, cvs, branching is hard to practice... infact, unless things have changed in svn land, its almost voodoo to get right... so ppl don't practice branches... and from what you're describing... you asking everyone to commit to mainline... that is just toooo strict and forces a workflow where you have to have your ideas properly laid out before you commit.

DVCS like git and family thrive on light weight branches... and once you have lightweight branches... you don't need to commit to mainline... which means you don't need to always automatically merge with upstream. this gives you lots of flexibility in different workflows you could choose. for instance, your dev team could write a post commit hook that always pulls head, rebases and pushes back and your team is forced to use that.

Centralized VCS are a small subset of DVCS and as such... any kind of work flow is possible. Another angle is that its kinda presumptous to force a workflow on ppl, as opposed to allowing them evolve one that fits with the spirit of that community as dictated by the benevolent dictator for life (Long Live Guido!!! ;) )

@Namesake I'm good. Doing the bit-stream-consciousness dance while trying to achieve food-in-belly-nirvana(tm) :)
Mar 3
Seun Osewa - Hmm. I haven't attempted branching before; maybe I'll try it soon. I know SVN supports remote branching, but not local branching. Have you ever been in a situation where Git's cheap local branching really helped? Can you share the details?Mar 4
Mark Essien - I used it once. A client asked me to add a feature to my encoder, and I was not sure if this would be doable in a day or not. If I could do it in a day, I would add it, otherwise not. So I branched, and started implementing the feature. At some point, I realised that it would take much much longer. So I switched back to the normal branch - voila, everything okay. A couple of weeks later, I had some free time, so I switched to the branch I had started, finished up the code, merged with mainline and sent it off to the client.

The branch process with git is that all the files are deleted and replaced with the copy from the branch. So you don't have multiple directories there.
Mar 4
Essien Essien - I use local branches constantly; but me... i'm prolly just high on dried paw-paw leaves :)

I love my commit history to look just right, and since most of my projects are in small teams, I love to have something that is up to date and always works, so most of my projects now look like this:

master branch: Always builds, all tests pass, all features work as advertised except for bugs I don't yet know about. Eventually, master will contain enough stable features to be tagged a version number.

dev branch: Contains lattest code that should work. Will probably be ahead of master untill everything is well ironed out, then I'll merge this into master.

topic branches or what you will: I normally branch these off of dev. Do my feature implementations here, test them, fix them, once done, I rebase off of dev, then merge into dev and delete the topic branch. Cool thing is that if I'm working on a feature, another person can work on another feature, and eventually merge both back into dev after a rebase. I've just completed a J2ME application this way three weeks back.

This is how my 'erlcfg', 'lyra', etc projects on github also works.
Mar 5
Comment
Like
Seun Osewa - Buzz - Public - Muted
I hereby recognize 234next as one of Nairaland's biggest competitors. They have a very active comments section. If all you're interested in is political news and comments on the news, you might be tempted to forget Nairaland altogether. And unlike most other local newspapers, they really care about their website. They really promote it aggressively. Kudos.
1 person liked this - Femi Alla
Prosper Onogberie - he he...if they allow posts like "Husband wanted God fearing US, Uk citizen only apply within. I'll recognise them as a competition."Feb 27
5 more comments
Seun Osewa - Lol! Yeah, that's more in the domain of Sun.Feb 27
Femi Alla - I recently found that one of the best web developers I know now works for 234next.com. He used to own/run his web design firm years ago. This was an indication to me that 234next is really serious about their site. Also, the pedigree of some of the owners is a good indication. For example, Jeremy Weate. http://ng.linkedin.com/in/jeremyweate. A few years ago, he was known for his blog, Naijablog. I think it used to be the most read Nigerian blog. http://www.naijablog.blogspot.com.Feb 27
Mark Essien - That's a very good site. Well written, good design and providing good info that the sites of the major papers are not providingFeb 28
Seun Osewa - Yeah but they must die! :-)Feb 28
Prosper Onogberie - See your mouth....except you intend to go into their market...But I think I have some nice Idea you could implement for NL...do you have an Idea suggestion section ?Mar 1
Olaitan Mayowa - I DONT BELIEVE IN 234next, nothing like your forum.Mar 6
Comment
Like
Seun Osewa - Buzz - Public - Muted
Can't get the JTabbedPane to look right with the Windows L&F. In XP and Vista, selected tabs are white. If the JPanel inside a selected tab has a grey background, it looks rough and ugly. If the JPanel inside it has a white background, it looks neat and ugly.

Update: Found a temporary workaround.:
UIManager.put("TabbedPaneUI","javax.swing.plaf.basic.BasicTabbedPaneUI");
Comment
Like
Seun Osewa - Buzz - Public - Muted
Hope to create a tool that makes people like me more productive. First version didn't work.
Comment
Like
Seun Osewa - Buzz - Public - Muted
"You want to 'friend me'? Send me a patch."
Comment
Like
Seun Osewa - Buzz - Public - Muted
http://hginit.com/ Highly rated mercurial tutorial (mercurial is a DVCS, like Git, which is supported by google code)
Mark Essien - Can google code projects be private?Feb 25
Seun Osewa - No, they have to be open source. You have to choose from a list of licenses. But the web integration of each feature is to die for.Feb 25
Comment
Like
Seun Osewa - Buzz - Public - Muted
The only thing I expect from Goodluck Jonathan is a sincere effort toward ending the Niger Delta crisis. As a Niger Deltan, he is probably our best chance for peace in that region. ND needs good luck.
Comment
Like
Seun Osewa - Buzz - Public - Muted
If you're interested in the agriculture sector, you should properly focus on helping to improve food storage and transport technology. Much the food we produce goes to waste. You can do more good by fixing that.
Comment
Like
Seun Osewa - Buzz - Public - Muted
Why can't playing an audio file be as simple as: Audiolib.play("myfile.wav") ??
momoh Ibrahim - Seun, that is not simple to the common man.Feb 25
5 more comments
Seun Osewa - Now imagine having to type 20 lines of code to do just that! Welcome to my world.Feb 25
Mambe Churchill Nanje - then wrap those 20lines in a class/object that is suenaudio.play("myfile.wav")...
then you declare
class seunaudio{
public static void play("file){
//TODO: put the 20lines in here and live goes on
}
}
Feb 26
Seun Osewa - If the entire world has to use the same 20 lines, why are they not in the standard library?Feb 26
Mambe Churchill Nanje - because they haven't been using Java for audio algorithms more. but I guess the game developers must have some proprietary packages that do more advanced stuff than this but its kept secret ;)Feb 26
Seun Osewa - Or maybe they just want developers to suffer a bit before getting any work done. :-)Feb 27
Taiwo Aigoro - well you can look around for classes and scripts that you can just import. I dont angry with seun's they are trying to make life difficult theory as a developer, how else can you get flexibility without starting your code from scratch, also not everybody wants their code to just play they might need it to do some other things.Feb 27
Comment
Like
Seun Osewa - Buzz - Public - Muted
Business Idea: Power Consultant. Teach businesses and professionals how to use inverters, small generators, and power-efficient devices to save time and money in Nigeria. Supply all the gadgets they need.
Seun Osewa - Show them how to use compact fluorescent light bulbs, plastic fans with efficient motors, laptops instead of desktops, power-efficient LCD TVs, etc. with inverters, lots of batteries, and a small generator to charge the inverter when electricity is off for days or weeks.Feb 24
Seun Osewa - Show them how to manage their food without refrigerators. If they must keep drinks cold, show them how to make do with small desktop refrigerators.Feb 24
Comment
Like
Seun Osewa - Buzz - Public - Muted
Buzz is not Twitter. If your buzz stream is linked to your Twitter stream, your Twitter stream is very active, and your Twitter stream isn't interesting, I'm just going to have to
1 person liked this - titilayo adelagun
Seun Osewa - Twitter hashtags and obfuscated URLs are in Buzz are particularlyFeb 23
10 more comments
Prosper Onogberie - ..it's a publicity tool...Feb 23
Seun Osewa - Yeah, Twitter is a promotion tool. I guess I would rather not beFeb 23
Prosper Onogberie - Discussions are often more informative...Feb 23
Seun Osewa - Exactly! And Buzz supports that, so we shouldn'tFeb 23
Mambe Churchill Nanje - Seun I dont get all what you saidFeb 23
Seun Osewa - I'm deliberately leaving out the end ofFeb 23
Prosper Onogberie - @Seun your mates are sleepingFeb 23
Sachin Garg - lol, thats an interesting way to share your frustration with twitter's 140 character limit.

But the same problem of very active and uninteresting stream applies to buzz too. Buzz is more like facebook status updates with comments but with more 'discussions' only because early adopters are more likely to be more technical etc, wait till the masses arrive :-). Oh, I forgot to leave out the
Feb 23
Prosper Onogberie - The rest of the masses can be blocked or un-followed....hence you maintain your circle of preference easilyFeb 23
Seun Osewa - It's not that straightforward. Some people in my circle have good buzz posts, but their buzz feeds include their annoying twitter posts. It's a shame to have toFeb 24
Mambe Churchill Nanje - hahahaFeb 24
Comment
Like
Seun Osewa - Buzz - Public - Muted
.NET has a solid Date/Time picker. Java Swing does not. :-(
Sachin Garg - Hate to say this but "I told you so" ;-)

Java is cross platform etc but .net just makes life so much easier.
Feb 22
8 more comments
Mark Essien - Whyever would you want to use java? DotNet is the new native of the Windows platform and if your app does not need to be cross-compatible, then dotnet is certainly the way to goFeb 22
Seun Osewa - I was going to go with .NET; the GUI builder is really nice.
But I'm more familiar with the Java class library and Netbeans.
(I can write the non-GUI parts many times faster with Java)
The native look and feel support in Swing changed my mind.
Feb 22
Sachin Garg - You might also want to consider AIR. It is cross platform and I like the few AIR apps I have seen so far but I have no idea how easy/robust development experience will be on AIR.Feb 22
Ayodeji Aladejebi - AIR has the coolest GUI toolkit on the planet. but its Adobe and tools are not free :(Feb 22
Mark Essien - What about silverlight - seems like it would be a good match for a .net programmerFeb 22
Seun Osewa - Thanks guys. Fortunately, Swing is really working out for me. It's clunky atimes, but because it's so popular one never gets stuck: whatever you want to do with Swing, someone somewhere has tried it before. Swing used to be really slow in the <snip> 1990s, but since then the JRE has been optimized and computers have become much faster. RAM conservation is no longer a serious concern, etc.Feb 23
Prosper Onogberie - @all "Swing used to be really slow in the early 1990s"
This Guy has been in the game for quite some time now....
Feb 23
Seun Osewa - Whoops. I should have said late 1990s. Sorry about that. ;-)Feb 23
Ayodeji Aladejebi - Swing is a mature GUI platform and from Java5 days..slow swing has been a thing of the past. With Java 7, things will even rock more. like seun said, there is nothing you want to do with swing that someone has not made the code FREE for you online. What sun refused to invest in was making swing clean and beautiful meaning you need extra code to make things neat to tasteFeb 23
Comment
Like
Seun Osewa - Buzz - Public - Muted
GUI development makes me sad. I hate the feeling of not being in control of my own software; not knowing exactly what goes on under the covers; depending on someone else's "magic".
Ayodeji Aladejebi - too bad...then re-create the world...do yu have an idea the billions of "magic" that goes on under the Earth "hood" to keep you alive :)Feb 20
6 more comments
Femi Alla - Are you using Swing? From the frustrations you are experiencing, it appears you are.
What IDE are you using?
I'd say you should try Eclipse. Eclipse handles swing better than most others.. cos they 'do ojoro' - they use some native code to make life easier.
Feb 20
Ahmad Mukoshy - Buh GUI also saves from harmful codes, things you may not understand. #DontYouThinkSo?Feb 20
Ayodeji Aladejebi - @Femi Alla others? :) Have yu head of netbean? i created spike sms software using netbeans. you can download it at http://www.smsspike.com/downloads/install-spike-1.4.msi. Give it a try. if you register with it, it will autolink your business card with www.mybizkards.comFeb 21
Femi Alla - @Ayodeji. I've known Netbeans for years, from its very early realeases. Its a great IDE, but when it comes to building GUI using Swing, Eclipse eclipses it. GUI developed using Netbeans will have the standard or usual Java look and feel. Eclipse doesn't use standard Swing classes in a bid to achieve a look and feel that's almost native to the platform on which application runs.Feb 21
Ayodeji Aladejebi - @Femi Alla Eclipse uses SWT which is fine on windows but very ugly on linux. You also have to ship SWT libraries with your software and not just that, yu have to worry about which platform you are deploying on so that you dont copy SWT dlls with linux build. btw LimeWire is one of the most used Java software on the planet. it uses swing.Feb 21
Seun Osewa - @Femi Alla Actually, Swing now supports native look & feel. The marketing geniuses at Sun didn't feel the need to enable it by default, but you can invoke it with this incantation:
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

@Ayodeji Aladejebi I have a problem with heavyweight web frameworks too; maybe it's about what one likes about programming. When I was younger, I was interested in making games. Then I learnt about DirectX and Direct3D and lost interest completely. :-(
Feb 21
Ayodeji Aladejebi - @Seun Osewa We actually all wanted to build games growing up :) I wrote my first game with QBasic at 16 trying to compete with the early Basic games such as Snakes. only to grow and realize Basic is weak for serious developments. anyway it all depends on what yu intend to get out of programming. For me, it is building an enterprise for service provision and in the service provision industry, yu use whatever gets the job done. customers care less about swt or swing anywayFeb 21
Comment
Like
Seun Osewa - Buzz - Public - Muted
Gmail Offline doesn't work with Firefox 3.6.
Sachin Garg - I heard that Gears is now obsolete and there is a more 'standard' offline mechanism coming in newer browsers. But I never used gmail offline, it never worked with my drafts. While composing emails it would auto save multiple copies in drafts if I unable offline.Feb 19
Mayowa Akinyemi - Seun that's not totally true... I use gears with FF3.6.
You can download it from here http://gears.googlecode.com/issues/attachment?aid=4622371929573251371&name=gears-win32-opt-0.5.34.0.xpi

I found it here http://code.google.com/p/gears/issues/detail?id=980 (scroll down to comment 40)

HTH
Feb 21
Comment
Like
Seun Osewa - Buzz - Public - Muted
My next project is a time-management application. Everything revolves around the UI, so it requires a GUI. I was going to use Java Swing, because Netbeans supports it well. Then I remembered Windows Forms and C#. So I'm going to investigate Visual C# Express Edition for a few hours at least. Hope it's a right direction.
Seun Osewa - I'm fully on board now. It just works.Feb 19
2 more comments
Mark Essien - Open source or closed source?Feb 19
Ola White - Good Luck man!Feb 19
Seun Osewa - Thanks.Feb 19
Comment
Like
Load more buzz
Something I still can't find on Google
friendship
My superpower
mind control and invulnerability would be great
Interests
problem solving
My places
Map of all locations where the profile owner has lived
Report this profile