Entries Tagged as 'Linux'
Here is a quote from a wise comment in the discussion of the “Linux system programming” book review:
Build your code with -Wall -Werror (or your compiler’s equivalent). Once you clean up all the crud, that pops up, crank it up with -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith. Once there — add -Wreturn-type -Wcast-qual -Wswitch -Wshadow -Wcast-align and tighten up by removing the no in -Wno-unused-parameter. The -Wwrite-strings is essential, if you wish your code to be compiled with a C++ compiler some day (hint: the correct type for static strings is ” const char *”).
For truly clean code, add -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls.
The people, who wrote and maintain the compiler, are, most likely, several levels above you in understanding programming in general and C-programming in particular. Ignoring the advice their code generates is foolish on your part…
As a minimum, solved warnings will make your code more readable by reducing/eliminating the “Why is he doing this?” questions. More often than not, they point out bugs you would otherwise spend hours chasing with a debugger later.
And they make your code more portable. But if you don’t understand, why a warning is generated — ask around. Don’t just “shut it up”. For example, initializing a variable at declaration is usually a no-no. If the compiler thinks, the variable may be used before being initialized, scrutinize your program’s flow. If you can’t figure out, it may some times be better to disable this one warning temporarily with -Wno-uninitialized to move on, instead of shutting it up for ever by a bogus “= 0″ or some such…
Tags: c, coding, compilers, Linux, Programming, tips, warnings
Posted in All on
January 5th, 2008
·
3 Comments
Slashdot runs an excellent discussion on the topic of “What Did You Change Your Mind About in 2007?“. If you want to learn more about what people on the Web had changed their minds in 2007, try this Google search - plenty more there.
What did I change my mind about in 2007? Short answer: Google. Continue reading for the long version.
[Read more →]
Tags: android, google, history, ibm, Linux, microsoft, open-source, Personal, predictions, red hat, Technology, Thoughts
Posted in All on
January 4th, 2008
·
No Comments
Remember the other time I was agreeing with Matt Mullenweg’s prediction of Microsoft opening sources of Windows by 2017? Remeber I wrote a list of bullets with my reasons? Remember the first one being:
Neither Microsoft in general, no Bill Gates are stupid. They are very much profit oriented. Whatever makes them more money, they’ll go for it.
Well, here is another piece of news that confirms that.
Quote #1:
Novell was paid a whopping $355.6 million by Microsoft in return for software licensing
Quote #2:
Microsoft purchasing 70,000 licences for Novell’s SuSE Linux enterprise server, which accounts for much of what Microsoft was paying for. Microsoft, in turn, then sells these on to its customers.
Quote #3:
“This is to bridge the divide between open source and proprietary source software,” said Microsoft CEO Steve Ballmer at the time, in what amounted to an abrupt about-face on his part given his previous criticism of Linux. “It gives customers greater flexibility in ways they have certainly been demanding.”
Tags: Linux, microsoft, novell, open-source
Posted in All on
November 14th, 2007
·
6 Comments
A new version of my favorite Linux distribution has been released recently - Fedora 8. I got my hands on the installation DVD (thanks bro!) and tried it straight away.
It didn’t go very well - the installation was hanging up during dependencies check. I thought maybe it was something simple to fix and checked it with strace, which showed that the installation was looping constantly creating some temporary files and then removing them. I tried to create these files by hand, but they were immediately removed. I asked around on #fedora IRC channel, but it was over a weekend and it was rather empty. No tips were given.
Then I came across Michael’s post that reminded me that I could do an upgrade using Yum package manager, bypassing the installation altogether.  Following the steps in the guide was simple and soon yum started downloading the new packages. But my Internet connection is pretty slow, it would have taken me about two days just to get the files.  Not much fun to wait. Instead I decided to copy files from the DVD to /var/cache/yum/fedora/packages/ directory and restart the upgrade process. Now all I needed to download were the updates that were released since the distribution went public.
A couple of hours later I rebooted into Fedora 8, running the new tick-less kernel (the biggest reason for me to upgrade). I also noticed that a few fonts packages were updated - fonts are sharper and cleaner. NetworkManager was upgraded. And a few other things improved.
I’ve heard a lot of people complaining about sound problems due to a new sound server, but I didn’t have a chance to test it yet. Other than this though everything seems to be running just fine.
Tags: announcements, experience, fedora, Linux, news, Upgrades
Posted in All on
November 12th, 2007
·
8 Comments
Chiefy for the www.f0bia.org !!!
I’m browsing through hundreds of web sites every day, and it’s been a while since I saw something that struck me as original. f0bia did it for me. With dark background, blinking cursor, and keyboard navigation it closely resembles UNIX command line. Yet it’s not just a show off, but a real blog with posts, search, RSS feeds, links, pictures, etc.
Well done!
Update: for those of you interested in technical details, the blog seems to be running WordPress and WordPress CLI theme.
Tags: awards, command-line, javascript, Linux, webdesign