Blog

Boost library rocks!

I have been messing with a project through the university and we decided that we would go with the Boost library for the project, so to read up on Boost and how to use it, I decided I would attack Project Euler using Boost. One area that Boost really showed its strength was determining how many Sundays fell on the first day of the month between January 1, 1901 and December 31, 2000. In just a few lines, the answer was apparent. Here is the lines of code that answers this problem, and answers it immediately. I had used other calendar solutions in C++ in the past, but the gregorian.hpp library is fast.

#include <iostream>
#include "boost/date_time/gregorian/gregorian.hpp"
 
int main(void)
{
    using namespace boost::gregorian;
    int count = 0;
    date_period dp(date(1901, Jan, 1), date(2000, Dec, 31));
    day_iterator iter(dp.begin());
 
    while (iter != dp.end())
    {
        if (iter->day() == 1 && iter->day_of_week().as_enum == 0)
            count++;
        ++iter;
    }
 
    std::cout << count << std::endl;
    return 0;
}

The answer takes milliseconds, it is just that fast. Right now I would like to replace my gmpxx libraries for big numbers with a boost library and I think all of my Euler answers will be “boosted.”

Posted in Development | 11 Responses

New Year Resolutions

It is about that time of the year, where people start bringing up their New Year Resolutions. For those of you who do make resolutions, what are some of them?

A few of mine would be:

  • Get through another semester with perfect grades
  • Move back out east to be closer to my x-wife and daughter
  • Get back into weight lifting – got a little pudgy over the past 6 months
  • Get more involved in software development (hopefully get a nice job in it too)
  • Seek out more business ventures
  • Loosen up around the edges a bit, take a breath and step back at times, look at the bigger picture and not worry about the torn corner I may currently be in

Pretty boring, but who knows, I might add something interesting, like sharing a meal with a polar bear or something ๐Ÿ™‚

Posted in Personal | 3 Responses

RE: Regular Release Schedule Benefits

Tristan, I will have to agree to disagree on this one for various reasons.

First of all, Ubuntu needs to solidify its public image as much as possible.

As does Kubuntu. This isn’t a one pony show and it isn’t always about Ubuntu, at least that’s the way I feel, how others feel, well I can’t speak for them.

As for the whole LTS moniker, ya I think quite a few of us in the Kubuntu community would love to have LTS as well. It is obvious that people really want that LTS moniker I guess before doing business, however the French Parliament nor the Canary Islands chose that moniker, and instead went with what was fresh, so they went with Kubuntu 7.04, and they rolled it out big time. What we really need, is to see the results from Dapper upgrades before any of us not officially with Canonical, who I would guess would have such results, can stop assuming the whole LTS thing. I can see LTS being a hit in the server market for sure, but I would love to see the desktop results.

I understand why Kubuntu wants to delay their LTS release.

Actually, Kubuntu doesn’t want to delay “our” LTS, we would be happy making everyone else happy, but obviously the powers-to-be made a decision. I would really think that Canonical had some background information in order for people to make such a decision. As for Kubuntu 8.04 we are sticking with KDE 3.5.8, or if it happens, KDE 3.5.9, but we are also going to offer KDE 4.0. This was the plan from the beginning, since UDS, and if you look at the OpenWeek logs you will also see the transparent communications of such a plan.

The unfortunate timing of a moving KDE 4.0 release date is a problem that can be corrected. Mark Shuttleworth suggested at the last aKademy conference that KDE should change its release process to a hit a regular schedule. You can view the video of Mark’s keynote address on the web. The idea is a simple one: Set a hard date and modify your goals (features) to match that timeline.

This is the one that really hits a nerve really, and obviously it hit the nerves of many who were present at aKademy. First off, Mark is great, he has done so much for Free Software, Linux, and definitely Ubuntu. Ubuntu may be one of the top dogs in the Linux world, but it is still an infant in respect to both KDE and Gnome, and I have been one to always respect my elders. If KDE had a regular release schedule, I am sure someone would find it in themselves to say they aren’t doing it right, or it isn’t good for us. As it stands, KDEs release schedules have always worked well for Kubuntu. We were always able to get the latest release in for each one of our releases. Don’t know how much more regular you can get than that. I don’t believe a project should have to modify their goals just so another project can meet theirs, unless of course there is a contract involved, and I haven’t seen one of those floating around yet.

I believe that it would tremendously benefit KDE to create a regular and predictable release schedule. See the benefits that this has had for Gnome and Ubuntu.

I can honestly say I haven’t seen the benefits only because I don’t follow it. The benefits I have seen is that Ubuntu brought a lot of new users to Gnome, but Ubuntu isn’t to be thanked for all of Gnome’s success. Recently the Gnome Developer’s Kit was released, and the distribution they use is Foresight, which is also helping along with Novell, Red Hat, and many others. I don’t think Ubuntu has popped out of the ground beating its chest just yet, so I don’t think it is fair to tell another project to hop on board and follow our release cycles. I don’t think it would be fair to tell KDE to follow our release schedule either, especially since a lot of the developers are volunteers, just like every other community. There are times of the year where development is slower because of the lack of people. Honestly, Ubuntu doesn’t have the power, no matter how awesome it is, to attempt to even direct that. Would it be great if everyone had a regular release cycle, sure, and just think about how great the competition will get. It will be a market or get owned community, and with the likes of Novell and Red Hat, that is some stiff competition to out-market.

A predictable release allows external parties to prepare and plan for the release. If KDE does this, they too will reap the rewards that Ubuntu has seen.

Who is to decide the predictable release? Surely not Ubuntu. And it also goes to show, that since KDE didn’t follow Ubuntu’s predictable release schedule, they sure as hell have been very successful and continue and strive to be excellent, with or without Ubuntu.

People leaving Debian, well that was more than just a predictable release cycle. There was that whole community thing as well, which it has been the community that has made Ubuntu excel, as well as it has been the community that has made Gnome and KDE excel.

Ubuntu is great, but it isn’t a God, and honestly has no right trying to tell another developer community how they should go about doing their releases. If Kubuntu was to sit back and not focus on KDE 4, well come time for the next release we will have this same problem with people upset because we are far behind, and we will have to hear things like “we need to catch up with Ubuntu.” I have been tired of hearing that and I appreciate the fact that Kubuntu will work now for what can only make us stronger in the future. Do I want an LTS release for Kubuntu 8.04, you bet I do. Can Kubuntu do both? I believe we can, and actually we have implemented a great majority of the blueprints that were proposed for UDS Boston. We may be a small community, but damn it we are a strong community.

Posted in Development | Tagged , , | 7 Responses
  • Archives

semidetached
semidetached
semidetached
semidetached