Thursday, August 16, 2007

My lightweight Rails environment on Windows

I've seen dozens of articles regarding setting up a Ruby on Rails development environment for Windows, probably so have you. But none of those were lightweight, were they? There hides the difference.
I still remember those web 1.0 folks who swore that Notepad is the killer app for web development. Well, back then, being a beginner who didn't know why is needed, I mainly understood them. You know how to code a 200 line "personal website" (ohmy, where are personal websites these days?), you're good. You did it in Notepad? Oh my god, you're the master of web development. These days, though, things have changed. The web, as it is, is a lot more accessible, almost anyone can start developing intelligent applications, you just need a good idea and, well, Ruby on Rails. Resources are unlimited, so if you have the idea you'll probably have some success too. But you need a workshop to forge that idea.

The Editor

I could have written "Integrated Development Environment" as a title for this section, but I think that those built for Rails aren't really the way they should be. They offer too much features, so you don't know where you really are. They offer exactly the bloat which Rails doesn't have. I don't know what your opinions are, but I rather type in a line into a console to generate a controller instead of proceeding through dozens of menus, input boxes, drop down lists, radio buttons, and so on. Rails is simple, let's keep it simple (, stupid). So, the Aptana-RadRails pair is shot down. No more fairy tales, I'll tell you what I have: Notepad++ with the Explorer plugin.
Notepad++ offers very good syntax highlighting, (and can easily be set up to support .rhtml, .rjs and .rxml files too), and the explorer plugin makes it fairly easy to navigate between the files of your app.

The Browser

You type it, then you check it out. Does it work? Maybe it does, maybe not. This simple question can be answered with a simple browser. No plugins, no extensions. Just your eyes and your browser. However, if you feel responsible for the experience your users go through, you should dive in deeper: Does it work the way I wanted it to work? Well, this isn't a too complex question either, but in order to ensure that your application delivers the same result anything the user might use, you have to give the details increased attention. You should use valid markup, valid styling, JavaScript which doesn't scream (unless you've written a scream_as_loud_as_possible.js script). Also, let's admit that we're human beings too. We need some luxury. Here, I mean that I don't want to create a screenshot of a website to determine what color is used in a particular area. Also I don't want to create five screenshots and then cut them together if I want a picture which shows the whole site. To keep lightweight, I use only what I strictly need. Four simple extensions:

Firebug
I dig this little bug. It tells you if you have errors, you can easily analyze the structure of your site with it, dive into AJAX requests, see DOM properties. It has a gold from me.

Web Developer
After those nightmares with Internet Explorer toolbars at a first glance I didn't want to install this. I though it steals me valorous browsing space. And hell, I was right! But I couldn't even dream about how much it offers in change. I'm using it for almost a month now, and It's like an orgasm (for a month, yea :D). I don't think that a month is enough to explore all its features. It offers easy cookie management, disabling of JavaScript (which is sometimes needed when you're going to create accessible sites) is just one click away, you can visually analyze your site's structure. It's the way to go.
ColorZilla
Just as I said two paragraphs before. It makes everything simpler. You get the color you want in two clicks instead of the long process which consists of creating a screenshot, opening it with an image editor, and finally getting the color.
Screengrab
Oh, I admit. This one doesn't have anything to do with Rails, and this is the one I use the least. But those few times when I need it, it's ace. Really. It kicks ass. It rocks. It grabs you the whole site you want in a single click, from top to bottom, not just the area you see (actually, it can also get that one, too - wonderful, isn't it?)

The Terminal

Still stuck with the Windows' command line? Go, get
Console! If you've done at least the demo app from the beginning of Agile Web Development with Rails (great book, great book), you know the console is one of the few things you'll need during Rails development. Usually, you need one for the server. Another one for the generators. During development, you generate new stuff quite often. It's best practice to keep a window (or a tab, if you get Console) open for that. That's two. But you might need one for script\console and one for the database shell. So, the number can go up to four. And that's just Rails. What if you need another tab for something else? Oh, 'nuff said! Just get Console. Trust me.

The Fairy Tailer
Also missing good old tail -f from UNIX? In the beginning you will surely do lots of errors, and the syntax might look Greek.. Also, the community won't help you if you don't have appropriate traces - tail for win32 is what you need. Open development.log with it, and you'll always see the end of the file. No need to open the file any time you make a new request. It does the thing automatically.

That's it for now. Hope you'll make some use of what I've scrapped down here. Feel free to comment if you disagree, or you'd propose something else.

P.S.: I tried to insert screenshots of the mentioned software, but it just screwed up the text. After trying twice, I gave up. So the screenshots are posted to my Flickr profile. Check them out here: http://www.flickr.com/photos/75522731@N00/sets/72157601475742386/

Ahoy!

Time for another "hello-i-am-back-again" post. :-) I've had my exams (success), I've gone to a physics-biology-chemistry competition (another reason I couldn't post for a while), but I'm back again, with another plan in my mind regarding "more mature" posts. We'll see. If anybody is still reading this little crap, well, thank you. If I were you, I'd have possibly deleted it from my feed reader, bookmarks, etc. If this blog was something larger than what it actually was, probably Arrington would have put it into his now infamous dead pool. Even though, I think I can be proud of what I achieved. And now, putting that pride in the mentioned dead pool, I'm going to start it again.. Aha, I'm doing exactly what I shouldn't. I'm going to reinvent the wheel. I know in most cases proceeding so is considered incorrect, but in mine it isn't. My wheel wasn't rotund. It was an irregular, random shape, using which you just can't travel. My new challenge is not to strengthen that irregular wheel, but leave it maybe weak, but at least make it round.

Monday, May 21, 2007

Interview with MPlayer's dev's


I requested an interview from the MPlayer team, and today I got a reply mail: "We're ready!", and few hours later I was talking about their award-winning software with
  • Alex Beregszaszi - Project Maintainer

  • Diego Biurrun - Project Maintainer, Server Admin

  • Oded Shimon - General MPlayer Developer, mainly MEncoder


Me: How was MPlayer born? In case of many programs there are serious things (in most cases the lack of something) which inspire the developers. What was that for MPlayer?

Alex: As none of us was who started it, we can only share our viewpoints of this. First Arpi just hacked xmmp (x multimedia player), but later decided to write his own, based on some libraries. The real shot was FFmpeg, however. The project was started in 2000.
Diego: It was the lack of a good multimedia player for Linux, Arpi found the players at the time to be buggy, feature-lacking, or all of the above.
Oded: I'm a general developer. I have little bits in most major components
in MPlayer and MEncoder. I don't maintain many parts.

Me: What's your post at the MPlayer team?

Alex: I'm just a developer, trying to maintain it, but unfortunately I don't have enough time resources to do it fine. In the past MPlayer was maintained by Arpi, but nowadays it's just a bunch of people looking over certain areas.
Diego: I'm the server admin, and another maintainer as well.

Me: Is it hard to get all those awards? I mean, does it require hard-core marketing, or it just comes, thanks to the amazing quality of MPlayer?

Alex: It just comes with reputation and quality.
Diego: We don't do much marketing at all. We just put out releases every now and then. The rest is word of mouth, I guess. Nowadays we have a booth at LinuxTag every year, and some of us can be found at conferences. Marketing is not something we focus energy on.

Me: What do you think, how much percent of the users use the Windows, FreeBSD and other ports? As I understood, Arpi just wanted a quality video player for Linux, though today you have several ports.

Diego: Measuring the popularity of an open source program is quite hard - I have no idea which of the big three multimedia players is the most popular. We do seem to win all the awards, though ;)
Oded: I think in a very obvious way MPlayer is most popular in GNU/Linux, while VLC is most popular (of the 3) in Windows.
Alex: Yes, as I see all the awards come from Linux sites, and not from "Windows PC magazine". Long time ago Arpi "measured" popularity using the Freshmeat TOP100 page.
Oded: All I remember is when I asked about video in Linux I was told purely MPlayer.. maybe that's changed or I am wrong, that was 2 years ago.
Diego: I expect MPlayer to be more popular on the BSD derivatives than the other players because it's more command line oriented and BSD nerds tend to be more command line oriented.
Diego: The Windows port will probably get popular once we commit the Windows GUI, which should happen soon; already some people seem to use the command line version on Windows. MPlayer OS X is popular as well.

Me: What do you think about the small multimedia distros using MPlayer as their engine, like GeexBox, which is 6.3 mb?

Diego: I think it's the natural choice; MPlayer is still the smallest player. You don't need to install all the GUI overhead. I don't know if they modify the build, but if you leave out the fringe codecs I expect you can shrink the size considerably. It's been some time since I experimented with creating a minimal build. My stripped binary is 5.8MB, I think I managed to push that down to 2-4MB!
Oded: I actually played with creating a maximal build; got upto 73mb for single MPlayer binary, it was just debugging stuff, after strip it was back to 6mb.

Me: Are you in any ways affiliated with projects like GeexBox? So do they ask for exclusive supports sometimes, for example?

Diego: No. We're only affiliated with FFmpeg, since many developers are shared.
Oded: However, GeexBox did send us some patches.

Me: How about the backend? Users see just comedy, horror, and all kinds of movies.. How many developers do you have? Do you organise coding meetings, or such? What systems do you use for coding?

Oded: Mostly mailing lists. As for developers, it's extremely hard to count.
Alex: "Coding meetings" happen on LinuxTags.
Diego: We have a small group of active maintainers and many outside contributors that send in a few patches. Some of them continue contributing and after some time we make them developers with write access to the repository.

Me: Do you get money prizes with the awards? How do you pay for the hosting, etc.? Do you have sponsors?

Diego: No money with the awards. We get the hosting donated, so we have sponsors. (http://www.init7.net)

Me: About versions.. You are working on 1.0pre* releases since 2003. Is it going to be something like wine, where the alpha stadium took around 10 years?

Diego: It's not alpha, what we put out are releases. And CVS is stable as well.
Alex: We have flames about the naming schemes. Some propose 1.0.9 instead of 1.0pre9, though I'm in favor of 2006.04 or 6.4.

Me: So when will 1.0 final come out (will it)?

Diego: To clarify this: our releases are not even beta, they are perfectly stable. But I suppose we will have to give in eventually and change the naming scheme to be more in line with people's expectations.
Alex: The problem is that a version of 1.0 can't be reached as new and new formats come every now and then. But the silly number still matters for users!

Me: How about version*pre*try*? Are the "try" releases stable too?

Diego: Yes, the tryX versions are the releases with just security fixes applied.
Oded: If a (serious) security exploit is found, we patch only it to the last release and re-release as 'try'.

Me: Do you offer any kinds of support? Or you let more experienced users to do that if they want?

Oded: There's an extensive man page and HTML docs which Diego insist we update with every single new feature.
Diego: We have user support mailing lists and IRC channels. We keep these separate from the development lists and channels, to keep the noise down. I personally don't follow the user lists/channel - I don't have time, so I don't know who gives support nowadays. I assume it's users helping out users.

Me: Do you support bundled editions? So those which are bundled into a distro, and might have edited code by the developers of that distro?

Diego: No. We only support self-compiled releases from latest CVS. We just don't have the manpower for anything else.
Oded: We prefer all edited code to be sent back to us.

Me: What should users expect in the upcoming releases? What'd be the most serious upgrade?
Diego: What we have in the pipe is a Windows GUI and DVD menus.

Me: What would you like to transmit to the readers of this interview?

Alex: Meet us at LinuxTag.
Diego: Try out MPlayer. Trust me, it's great! If you like it, contribute back, we always welcome more people on the team and have use for helping hands.

Me: What other projects do your developers work for?

Diego: It depends :) I think most devs have contributed odd bits of code all over the map. Probably Alex has the most diverse collection in his "portfolio". Many MPlayer developers - like we three - also work on FFmpeg.

Me: What do you think most important for the MPlayer developers coder community to remain integral?

Diego: Hmm, tricky question. More maintainers, I think.
Alex: Or just get someone to who employs one or more MPlayer devs in full time, even for just like 3 months, or so.

Me: Wouldn't you want better publicity, so more people would start using MPlayer? That inspires the developers well.

Diego: Users are great; they give you that warm and fuzzy feeling. But it really is developers that move projects forward and keep them alive. Or more maintainers to be precise.

Me: Thanks for the interview.

Diego: Thank you.
Alex: Thanks.
Oded: Thank you!

Wednesday, April 04, 2007

Interview with Wordpress leader, Matt Mullenweg

I don't know whether Google [our best friend], that is, the people behind Blogger have any restrictions regarding the content of a given blog, however, I'll act the innocent and post an interview with the most important Matt around [according to Google, our best friend], Matt Mullenweg, creator of WordPress, one of the most successful pioneer, when it comes to bringing programming to the level of poetry.
Please don't blame me for posting a WordPress-related article on a Blogger blog. As you may have probably noticed, I'm still minor, and my parents aren't that geeky - they don't sponsor me the way I'd like when it comes to computing, especially internet. I happened upon Blogger back in time when I didn't know too much about the software market, except some of the things I used everyday back then, - Microsoft Office, Yahoo Messenger, and stuff like that - thus I chose the first platform I found. I thought it must be good, if it's somewhat related to Google, so I started blogging. Since then, I suppose I learned very much [sigh, modesty isn't easy ;-)] - also learned what a blogging system should be able to do, and how it should do it. WordPress is an incredible, state-of-the-art software, and it is the to-be platform of this blog (let's tell the secret: the switch is planned for Q3 '07).
So here it goes! Matt Mullenweg answers the questions that have been crossing my brains like some top-notch motorbikes.


Me: Since probably some of my readers don't know who you are yet - I have to ask you to tell us who you are and how you're trying to change the world - with some fair success - by writing today's #1 blogging platform, WordPress.

Matt: A few years ago I was pretty frustrated with the state of tools for
publishing on the web, even though that was considered relatively solved
problem. I began hacking on Open Source and building up my programming
chops, ultimately co-founding WordPress with Mike Little in England, who
I had never met before besides interactions on our blogs.

Much to my surprise, WordPress has enjoyed a fair amount of success
since then, and it has evolved to encompass a large community of
contributors who drive its progress and develop add-ons for the
software. A year and a half ago I left my job to focus on WP full-time,
and founded a company called Automattic to hire a few other folks to
help me out.

Me: Most probably every user has his/her own favorite, but the real one is the author's. Which feature do you like the most in your preccccioouuss?

Matt: My favorite things about WordPress (in order) are the clean and flexible
URLs, the typographic auto-enhancer (texturize and autop), pages
functionality, and the comment moderation system.

Me: Would you consider selling WordPress if you'd receive a compelling offer?

Matt: It's a community, a project, not something that can be bought and sold.

Me: If we don't take it too strictly, WordPress can be used as a kind of CMS too (it can manage content..). Would you consider tinkering an explicit CMS built around/on top of WordPress' core though?

Matt: Absolutely, I think there are some great plugins that really flex WordPress' CMS muscles, and I think in the future it might be worth bundling those into some sort of plugin pack.

Me: What do you think, how much of WordPress' success is due to its Web2.0-ish flavor? Did riding the buzz worth it? Will this change, maybe?

Matt: Since WordPress got started about 4 years ago, I've never really thought of it as part of the Web 2.0 wave. To the extent technology like JS and standards-based designs are now more feasible due to browser support and ubiquitous broadband, we're all over that, but the focus is on the user experience, not who's on TechCrunch today.

Me: What do you consider the other platforms? Equal competitors, competitors which can advance in future and become dangerous in WordPress' point of view, or you say that they don't have a chance against your numero uno?

Matt: Each of the major internet platforms have a blogging system: AOL Journals, Yahoo 360, MSN Spaces, Google Blogger, Myspace Blogs, etc. Of those we see the most overlap (and switchers) from Blogger, the others don't overlap with our userbase much. Six Apart's products have some strong parallels to ours, but I think they have different priorities as a company so we don't pay them much attention.

Me: Do you think WordPress would have the same success if it'd be written in an other language than PHP? Ruby on Rails, for example, is kind of hyped-up these days..

Matt: Not at all. We were very lucky to be attached to two platforms (PHP and MySQL) whose usability, speed, and reach is unmatched in the hosting market right now. It's just so easy to download and install a PHP script, that's one of the original reasons I started hacking in PHP as opposed to messing around with Perl and CGI-bins.

Me: What do you think about these grandiose website transactions going on these days? Do those sites really worth the money they are being sold for?

Matt: On some level something is worth whatever someone will pay for it, but time will tell whether these things create long-term value for the companies that wrote the checks. Big acquisitions and mergers are difficult to pull off well.

Me: There's been debates and debates on the advantages and disadvantages of the GNU General Public License Version 3 (aka GPLv3). Will WordPress use v3, or ave conservativeness, let's just keep v2?

Matt: I don't know, it's something we'll have to look at as a community when the GPL v3 finishes its development.

Me: Do you already feel like those famous people, who by the time don't have the time to do anything but giving interviews, smiling, and taking care not to be the subject of a photo pecking a little girl, or those ugly bloggers will call you pedophile?

Matt: Can't say I do. :)

Thanks for sharing your thoughts, Matt! :-)

Tuesday, February 27, 2007

FreeBSD - The power to...

Some whimsical history

No doubt, I have had that somewhat weird period regarding operating system usage that most newcomers have to experience when entering the alternative operating system world. Yes, I've used almost every major Linux distribution, sometimes actively, other times it just lay on my hard drive, and I stepped back to Windows again. I even remember that once I felt like QNX will be my next desktop operating system. Well, you might have guessed - it didn't really provide the things I need for daily usage, and I couldn't find adequate documentation, thus I felt the need to change. Finally, my computer celebrated New Year with only Windows.. ouch, how alone could have felt my little chocolate bunny..
FreeBSD. I'm still reminiscent of the first time I tried to install this little beast. I was disappointed. It didn't work. It was my fault,even if back then I didn't recognize that, or even if I did in the deep dikes of my soul, I couldn't accept that, but I couldn't accept that such a renowned operating system doesn't boot on my little chocolate bunny. So far so bad. If my chocolate bunny doesn't like it, it isn't good. Further on, I found out that chocolate bunnies refuse eating operating systems (ever so illustrious it may be), unless they're served properly. Actually, a pal o'mine told me that my chocolate bunny might not like fats.. and ACPI is greasy like hell.. ;-)

How I happened upon FreeBSD again..

After months of struggling to find the OS I need I gave up. Switched back to Windows. I've been using Windows since I have a computer - I don't have any problems with it, except some security issues, which are rare like that when you use your system properly. I don't like anti-virus software, I never did, but that's another story. If you're still eager why, check what Jeff Atwood says - the best arguments which are somewhat akin to mine. It's not the system who makes itself secure or insecure, neither security software but the user. I had some kind of anti-virus software installed, can't remember which (amnesia, let me survive), but I turned real-time protection off, forgetting that I'm not the only user of Bunny. Damn it, didn't my sister click on a grinning smiley? No, no, no, noo, nooo, not again. I don't want to remember the first week I got my computer running Windows Me. Being cautious, I saved my little beloved chocolate bunny from another battle against horses, storms, buccaneers, etc. You know, the whole anti-rabbit shebang. That was the day FreeBSD 6.2 was released.

FreeBSD - what are we exactly talking about then?

FreeBSD is a Unix-like free operating system descended from AT&T UNIX via the Berkeley Software Distribution (BSD) branch through the 386BSD and 4.4BSD operating systems. It runs on Intel x86 family (IA-32) PC compatible systems (including the Microsoft Xbox[1]), and also DEC Alpha, Sun UltraSPARC, IA-64, AMD64, PowerPC and NEC PC-98 architectures. Support for the ARM and MIPS architectures are under development, while support for DEC Alpha was dropped in the 7.x development process.

FreeBSD is known to be organized. It's the only system I know that has a strictly distinct separation between base system and userland. Gentoo, for example tries to separate these two levels, but the distinction is not as in FreeBSD's case, where not only that there's a theoretical disassociation between the two levels, but the base system is maintained by a distinct group, and there's absolute compatibility between software. To make it look like an equation:
FreeBSD = base + (a+b+...+x+y+z), where the part in parentheses represents the add-on software, and base is the base software package, distributed with the kernel.
Linux = a+b+...+x+y - you can see that everything is in a common tub. The kernel is in the same place as Mozilla Firefox, which, in turn is in the same place as OpenSSH, and so on. Note, that here I mean operating system structure - mainly package management, and not memory management. I don't mean directory structure either, since that differs from distribution to distribution, even though some standards exist regarding that.
FreeBSD is aimed towards the more advanced user. It gives absolute control to the user provided the user knows to use some basic (it doesn't need anything spectacular for simple customization and management) command-line tools, understands some simple logic, which, even if looks somewhat queer at first sight, is clear, well-thought and well-tested.
Even if some of the developers would probably cut off some member of mine for this, I have to say that the most important difference between (Free)BSD and Linux is the philosophy. The distinction between software levels, the way power given to users is organized. Recently I feel like Linux tries to be the clown of open source software market by trying to keep its geeky, older image and creating the new, user-friendly image at the same time. They would have to decide. Oh, and yes, I see the grin on your faces whispering that there's CRUX, and Arch, and, and, and. Look at them. They're polarized like hell. That's not fine.

What do I have to do with FreeBSD?

I always felt trying out new operating systems challenging, being it another Microsoft product or an unknown few-kilobytes-sized hobby OS. Operating system development is the peak of software development and something that I always dreamed to be able to participate in further on. Actually, I first spotted FreeBSD 'round 4 years ago trying to find alternative operating systems which would run faster on my computer, than my actual Windows 2000 did. I remember I had a misconception that Windows is derived from UNIX, just like Linux, and there's no "serious" operating system besides these. So I found FreeBSD. Seeing that the actual website design isn't too appealing, the news are months' old, I didn't think that it's something serious - I bought a handful of floppy disks and decided to download it the next day. Worths a mention, that I had an incredibly slow dial-up connection back then, and anything larger than, say, 50 MB took too much time, thus we had to pay too much. You'd have had to see how surprised my face could be when I started the download and saw that it's two full CDs. I couldn't believe that it's possible to create an operating system that doesn't fit on a CD.
So, as you can see, my adventures mixed up soon with FreeBSD, but I didn't really take the chance to try it out.
The day I finally installed it and started to customize it was January 16, one or two days after 6.2's release.
It wasn't a too delightful process, but I learnt and experienced much. I had to read a few chapters from the handbook too, and I've read some that I didn't even need.
For example, I recompiled my kernel, for nothing, I struggled four hours to make GDM work how I want, tried all the window managers I know again, and compiled KDE (which I don't use), just to see how much it takes on FreeBSD.

FreeBSD is not the system that can be "reviewed" in the usual manner (or the way I used to review in the past). I could speak for hours about how much I like the package management variants it uses, and how well-thought its inner logic is, however, I don't want to. As I told you, it's not the software, it's not the developers, it's not even the users - it's the philosophy what makes this operating system, and I've presented it from my point of view. I think that if you think your philosophy has more matching points with that of FreeBSD's than with your current operating system's, you should obviously give it a try. You can only win.

Thursday, February 22, 2007

New Season

It's not news to anyone if I say that my blog wasn't that high-quality in the last few months of posting - fact reflected by the current number of posts. I think I've become somewhat more mature by time. More mature, eh. I mean, hopefully I'll be able to reach a higher grammar level and use a larger vocabulary as well. Also, I hope that my ability to form opinions about things has increased as well, since I've spent dozens of hours reading - studying programming, operating systems, and so on.. I've also learnt how much ketchup is to be put on fried potato in order to match everybody's needs, not just mine. More mature. There's another slice in my maturity-cake, filled with two creams: genuineness and reliability. I don't want to lie to my readers again. My readers, who can make my day by just typing three short words, and submitting this array of characters as a comment to a post o' mine.
In the future I expect to provide posts higher on quality and accuracy. Fortunately I understood that blogging is not about lying to my readers on a daily manner just in order to get some clicks on your ads. It's about writing your thoughts down if they start to shake and tickle your brain.
If only I could change the past.. but obviously I can't, and that's fine, if I think better. I've learnt many things by posting fraud articles - learnt what it takes to be honest, to be genuine. I don't know if anybody reads this now, but it makes me feel better. These few sentences have been tickling my brain for months..
I wish everybody happy blogging, without money-making propaganda articles, like mine were in the past!
Have fun, and please wish me some power to be able to keep my promise!