rubygems as the biggest obstacle to Ruby's adoption

Everyone and his friend is already aware that installing rubygems to a non-default location was a nightmare just until very recently (that is, version 0.9.5, produced on 2007-11-19).

Now, suppose we try to do something simpler, like err... uninstalling a gem. gem remove mygem yields no results. I do gem --help and... there is nothing about removing a gem in the command line help. Fine. Before deleting manually, let's look it up on the internet. RubyGems User Guide says it should be gem uninstall mygem. How nice!

OLPC: Omnipresent Loyalty Protection & Control

Тут abbra пишет про удачное внедрение OLPC и ненароком сообщает статистику испльзования этих компьютеров детьми. Это значит, что кто-то, даже не родители, а в лучшем случае учителя мониторят детские компьютеры на предмет того, что и когда они написали. А вы бы хотели, чтобы в ваш комп заглядывали без спросу?
Tags: 

Looks like it is not limited to Belgium

There is a whole thread on /. about the pay system failures in US public schools.

As usual with slashdot, you get sometimes a pearl while digging through a multitude of clueless comments. Here is one I found out for you:

Over time you get more and more complex rules for how to calculate pay. The end result is that nobody understands their pay slips anymore and it is nigh impossible to implement and test a system that handles all the exceptional cases.

Groovy documentation and the human mind

How can one not be disappointed with Groovy after looking at its User Guide?

Here is just one example. Can you tell from the StreamingMarkupBuilder documentation how it works? I bet no. After looking through the code snippets on the page and figuring out I could not understand a line of code there, I wondered what is the mkp variable that appears twice on the page.

It took me some time to get through the Groovy class hierarchy up to the BaseMarkupBuilder.java just to find the mkp namespace declaration.

 namespaces.put("mkp", "http://www.codehaus.org/Groovy/markup/keywords");   // pseudo namespace for markup keywords

After googling for mkp markup keywords, I found a page that explains in a few words the design of markup builders. Nothing more, nothing less. Now, I know everything I had to know about mkp and markup builders. The thing is, it is a post of the developer who just committed the markup builders feature. The documentation is supposed to be better that that but it not even worse, it is blatantly misleading.

Controlling the size of the $PWD in bash, version 2

Er... after reading the insightful comments at debian-administration.org, I figured out a much shorter version which is also easier to understand. Tested on GNU bash, version 3.1.17(1)-release (i486-pc-linux-gnu).

{syntaxhighlighter brush: bash} function truncate_pwd { newPWD="${PWD/#$HOME/~}" local pwdmaxlen=$((${COLUMNS:-80}/4)) if [ ${#newPWD} -gt $pwdmaxlen ] then newPWD=".+${newPWD: -$pwdmaxlen}" fi } PROMPT_COMMAND=truncate_pwd PS1="${ttyname}@\h:\${newPWD}\\$ " {/syntaxhighlighter}

Controlling the size of the $PWD in bash

I just fixed a 6-year old bug in the 5 lines of code that I use at least 100 times a day, every day, including weekends and holidays. Now, I can finally publish it.

function truncate_pwd
{
 if [ $HOME == $PWD ]
 then
   newPWD="~"
 elif [ $HOME ==  ${PWD:0:${#HOME}} ]
 then
   newPWD="~${PWD:${#HOME}}"
 else
   newPWD=$PWD
 fi

  local pwdmaxlen=15
  if [ ${#newPWD} -gt $pwdmaxlen ]
  then
    local pwdoffset=$(( ${#newPWD} - $pwdmaxlen  ))
    newPWD=".+${newPWD:$pwdoffset:$pwdmaxlen}"
  fi
}

PROMPT_COMMAND=truncate_pwd
PS1="${ttyname}@\[${HOST_COLOUR}\]\h\[${RESET_COLOR}\]:\${newPWD}\\$ "

Just put the above snippet of code into ~/.bashrc

Debian shows the absolute path in the command prompt by default, and it can be really long, sometimes.To fix this, we can limit the command prompt to show only the last x characters using only the variable expansion features of bash 2.0.5+. Since this code does not fork out sed, tr or wc, it is blazingly fast.

Java sucks where Python rulez

There's been a long-standing commitment from Sun to make Java backwards-compatible. It made introducing new features in Java painful (generics), and fixing bugs (java.sql.Timestamp vs. java.lang.Date) impossible. On the other hand, that huge Java Class Library really needs refactoring and compatibility breaking is the only way to improve the developer experience.

Python development goes on in a completely different manner. They are set on producing a partially incompatible version called "Python 3000" that will fix the major design flows of the language (e.g. crappy i18n).

I hope Java does the same or dies.

Using GNU screen's multiuser feature

I am regularly doing the LLOD support over phone+remote console to the production support guys. Our software runs on virtualized headless Fedora 5 instances that are accessible solely by ssh, as it should naturally be.

It turns out to be a waste of time to the person on the other end, as he just listens to me explaining what I do, without really seeing what goes on.

So, I decided to use GNU screen to share the console between us.

I log in as a user and start screen on the command line. Then, I enter ^A:multiuser on[RET]. That is, I type Ctrl-a, then I type a : to enter the screen's build-in command line. I can now activate the multiuser mode by typing multiuser on in the screen's command line that appears in reverse color at the bottom of the console window. To execute, I hit Return.

The other guy just has to log in with the same user and type screen -x to connect to my screen session running in multiuser mode.

Что делать?

В течение долгих лет у меня идёт вялотекущий спор с che по поводу причин оттока интересных людей из Беларуси. Из года в год уезжают отличные собутыльники, идеальные коллеги, люди, выделяющиеся из общей среды умением отдыхать и работать, смекалкой и бодрым настроением. Остаются чуть более ленивые, привязанные к семье, чуть более неуверенные в себе. Замечательная статья с продолжением отвечает на вопрос "Кто виноват?". Как ни крути, молодёжь растёт на канонах, далёких от современного уклада беларусского общества. Многие не находят себе места во взрослой жизни, но только некоторым удаётся сорваться с места и попробовать себя на новом месте, в чужой среде.

Так вот, вопрос, который задаёт che и на который у меня до сих пор нет чёткого ответа -- "Что делать?". Что нужно изменить в Беларуси, чтобы уменьшился отток интересных людей?

Pages