Archive

Archive for March, 2010

Unscrambling C Declarations

March 28th, 2010 No comments

Note: Based on some feedback I should clarify that this does not cover C99 syntax

Even though the C programming language has been around since the late 1960’s, many programmers still have trouble understanding how C declarations are formed. This is not unsurprising due to the complexity that can arise when mixing pointer, array and function-pointer declarations.

In this posting we shall look at some complex declarations to try and understand them by considering how they are formed. The intent is not so you can go off and write wonderfully complex declarations, but more hopefully you may actually be able to understand someone else’s code. Finally we shall look at how most complex declarations can be easily simplified.

Here I’m going to focus on object declarations/definitions rather than functions. Also, in this posting I’m not going to examine structure, union or enumeration specifies. They’ll keep for another day.

Tags: , ,

C++ Standard (C++0x) Thread Library

March 28th, 2010 No comments

The upcoming C++ standard (C++0x) will support multithreading and concurrency both as an inherent part of the memory model, and as part of the C++ Standard Library. “Multithreading and Concurrency” (Anthony Williams):

Also Herb Sutter is a leading authority on software development. He is the best selling author of several books including Exceptional C++ and C++ Coding Standards, as well as hundreds of technical papers and articles, including “The Free Lunch Is Over” which coined the term “concurrency revolution.”

Effective Concurrency: Prefer Futures to Baked-In “Async APIs”

8 Useful and Interesting Bash Prompts

March 28th, 2010 No comments

Many people don’t think of their command prompt as a particularly useful thing, or even pay it much attention. To me, this is a bit of a shame, as a useful prompt can change the way you use the command line. Well I’ve scoured the Interwebs looking for the best, most useful, or sometimes most amusing bash prompts. Here, in no particular order, are the ones I’d be most likely to use on my computers.

More

Tags: , , ,

Linux on Laptops

March 28th, 2010 No comments
Tags:

How to reinstall Ubuntu over existing installation while preserving /home

March 28th, 2010 No comments

Starting in Ubuntu 8.04, ubiquity (the ubuntu system installer) allows the user to install Ubuntu while preserving the /home directory. This allows you to reset your computer to default but to keep your personal files and configuration files. The point of ubiquity-preserve-home is that it’s supposed to work smoothly behind the scenes using Ubuntu’s Installer.

If you choose not to format the partition assigned to “/”, then everything on that partition that would cause problems for an Ubuntu installation will be removed (e.g. the contents of /boot, /etc, /lib, /usr, etc.), but /home and other unknown directories that might contain data will be preserved. Doing this does not require an explicit action by the user, other than choosing manual partitioning and *not* formatting the partition assigned to “/”. This may be used as a last resort to restore Ubuntu to default at the point of installation but will preserve the /home directory.

Ubuntu wiki

Super Grub Disk

March 28th, 2010 No comments

We want Linux newbies to restore their new toy, but also help the Linux advanced user make potentially dangerous operations to the MBR in a safe way. Super Grub Disk is also a teaching tool to help you learn more about bootloaders and the booting process. After all, booting is the most important thing your computer does — without the boot process, you would not have an operating system to use!

Homepage

Miro Video Converter

March 26th, 2010 No comments

A super simple way to convert almost any video to MP4, Ogg Theora, or a specific phone or iPod.

Miro Video Converter can convert virtually any video file to MP4, Theora, or MP3 (the audio only).

100% Free and open-source.

Homepage

Tags: ,

Russian Ubuntu

March 18th, 2010 No comments

Три уровня отождествления

March 17th, 2010 No comments

Что такое отождествление? Психология обычно рассматривает это явление как срастание личности с чем-то внешним по отношению к ней самой. Если в чистом виде личность говорит о себе «Я — это Я», то в состоянии того или иного отождествления формулировка меняется на «Я — это то-то», с указанием чего-то конкретного, с чем произошло срастание.

Естественно, все это происходит незаметно для самого «Я». Отождествление — процесс сугубо бессознательный. «Я» совершенно не замечает того, как начинает вкладывать себя во внешние объекты или ценности. Однажды оно просто обнаруживает, что что-то, казалось бы для него постороннее, вдруг стало жизненно важным, вплоть до того, чтобы поставить ребром вопрос о жизни и смерти.

В абстрактном виде звучит не вполне понятно, поэтому проще показать сущность этого явления на примерах.

Read more…

SDelete

March 15th, 2010 No comments

When you delete a file, Windows removes the index for the file and prevents the operating system from accessing the file’s contents. However, an attacker with direct access to the disk can still recover the file’s contents until it has been overwritten by another file—which might never happen. Similarly, files that have been EFS-encrypted leave behind the unencrypted contents of the file on the disk.

With the SDelete tool, available as a free download, you can overwrite the contents of free space on your disk to prevent deleted or encrypted files from being recovered.

SDelete homepage

Additional information: “Get 7 Free Tools for Managing Disks and File Systems