nunojob:~ dscape/08$ echo The Black Sheep

Posts tagged ‘Linux’

Guia para usar windows

Não está a funcionar? Reboot, esperar 25 minutos, usar enquanto está a carregar uns programas. Começar a trabalhar com 75% da ram ocupada e o processador com vários processos a concorrer por tempo. Bem bom..

Depois do reboot continua a não funcionar? Format. Agora já funciona! :) 75% da memoria ocupada, o java irá provavelmente crashar o computador nas próximas duas horas. Bluescreen assegurado uma vez por semana.

É isto que o pessoal chama enterprise ready. Yeah right. Montam coisas em cima de coisas sem se preocuparem com a qualidade.

Use linux! três razões (podiam ser 30 mil mas fico por aqui)

  • Mais barato
  • Mais fiavel
  • Mais rapido
  • Menos crashes
  • Nenhuns reboots
  • Nenhums formats
  • Já alguem usou MSDOS? Não desejo isto a ninguém. É tortura.
  • Tem problema? Vê o codigo e submete a fix.
  • Por ultimo, e para completar esta lista de três. É MELHOR!

Obrigado é tudo.

history | awk ‘{print $2}’ | sort | uniq -c | sort -rn | head

dscape@dscape:~$ history | awk '{print $2}' \
| sort | uniq -c | sort -rn | head
86 sudo
45 cd
27 ll
23 ./script/server
21 rm
17 ls
12 vim
7 startx
5 glxinfo
4 su

Contas

Há coisas que nunca são demais mostrar. Mesmo que antigas. Sobre o programa novas oportunidades:

  • 240 mil licenças de Microsoft Windows Vista Home BasicN Português DVD, 256,57€, resultam em mais de 61 milhões de Euros (61.576.800€)
  • 240 mil licenças de Microsoft Office Home and Student 2007 Português OEM, 128,51€, resultam em mais de 30 milhões de Euros (30.842.400€)

Mesmo que existisse a oferta do software, seria um presente envenenado cobrado várias vezes à economia portuguesa no futuro a médio e longo prazo.

Em
http://blog.softwarelivre.sapo.pt/2007/06/05/que-casamento-e-este/

Agora as mesmas contas usando uma qualquer distribuição Linux e Open-Office:

240 mil vezes zero = zero euros (linux)

240 mil vezes zero = zero euros (open-office)

total: zero euros

poupança possível do estado: 91 milhões de euros (dos vossos bolsos)

Eu até falei de como os portugueses são tão lorpas que são roubados quando compram estes computadores e nem sequer notam. Mas esqueci-me destes pormenores fantásticos, ainda são mais roubados nos impostos que pagam por causa de promaiores como este. Peço desculpa, é que usar qualquer palavra com menor quando estam envolvidos 91 milhões parece mal.

É de referir que a Microsoft – segundo consta – fez um descontinho. Obrigado Microsoft! ;) Sempre tão simpáticos. Portanto sim provavelmente as verbas são inflacionadas, mas isso é da responsabilidade do autor do artigo e não minha. Eu só fiz as contas – com alguma dificuldade admito – do linux!

[EDIT: Vi neste post o teste de literacia digital das novas oportunidades. Peço que o façam e constatem que são todos uns iliterados porque aposto que poucos vão conseguir acabar a avaliação. E vejam lá que alguns de vocês - como eu! - são engenheiros informáticos. Que vergonha! :(]

Rails::ActiveRecord XQuery && DB2::Mac

Most rails developers use OS-X. Mostly because rails is built-in the latest release (Leopard) and TextMate offers a great IDE to use with Rails. Some could argue that it also works nicely on Windows but I really believe that Rails ain’t done to be used on a Windows Platform. Many articles and interviews with rails creator DHH second this statement. Rails is easy to develop in OS X and deploy in a Linux distro of your choice.

In my most recent screen-cast I explored an interesting technique of taking advantage of rails RESTful design and DB2 pureXML features to easily create a web-service that could query a relational databases with XML support (like DB2). As you must know DB2 Express-C is distributed freely and offers no limitation to home users/small companies. So it would be awesome to expand ActiveRecord to support xml elements, if a schema was provided to the database.

I’m aware that a pure xml database stategy would be a bad approach but there are situations when it simply makes sense. And in those situations one would profit greatly of two things wich are missing.

  • XML Support for ActiveRecord – in construction?
  • DB2 for Mac – will this ever exist?

Antonio Cangiano is creating a plugin that revolves around this concepts, but in a DB2 centered perspective. In my opinion it would be best if the rails plugin worked not only for DB2 but for any database adapter with XML support – as long as such is provided.

Let me give you a sample. Imagine that you have a database model for translating you rails application. It could be something like:

Languages

  • ID, int
  • DOCUMENT, XML

Imagine that the xml file is

<language isoname="pt-PT">
  <hello>Olá</hello>
  <bye>Até a próxima!</bye>
</language>
(...)

If this makes sense in your application then you could easily do something like register your model to observe (see observer design pattern) the session['language'] for changes and, if it’s changed, it would get all the XML for that language – it would fall back to default if such was not available – and create the hash with the values. The problem with this approach – besides making no sense for the internationalization problem! – is that in the observer model you would have to:

Language.find :first

And fetch the whole xml and then process it. If the XML document has 10MB, it would take some time. With XQuery support on ActiveRecord we could simply

Language.find :first, 
  :xcondition => ["//language[@isoname==?]", 
    session['language']]

Or, if we simply wanted to say hello in many languages – like flickr in their first page – we could simply

Language.find :first, :xcondition => '//hello'

There are just two problems that prevent rails developers from being able to do this kind of things. And those are the lack of XQuery abilities in ActiveRecord and the fact that Mac developers cannot use DB2.

Optimus em Ups! I did it again

Descobri hoje que a Optimus é só para Microsoft Internet Explorer e Microsoft Windows.

Penso que em breve a Microsoft irá anunciar a aquisição da Optimus passando esta a chamar-se Microsoft Optimus. Uma excelente oportunidade para mudar de fornecedor de serviços não concordam?

O .NET não veio para salvar o mundo, se se dessem ao trabalho de ler um pouco mais, explorar, aprender um bocadinho viam que existem outras soluções. Cada uma mais ou menos indicada para cada função, CLARO!

Para a Optimus parece-me evidente que não é o mais adequado dizer aos clientes: Está a usar OS-X/Linux/Whatever. Solução: Olhe, use Microsoft Windows.

E SE EU NÃO QUISER?

Na volta na próxima estão-me a dizer que tenho que ir a este café ou aquele café porque apenas ai posso fumar. Devem achar que este pais é uma republica das (e dos) bananas. Mas não é Optimus, não é.

Também estou aqui a tecer considerações sobre a empresa que fez isto. Sinto a necessidade de mudar de operadora só é pena que não haja concorrência. Vai tudo dar ao mesmo, o mesmo antro de incompetência e mediocridade que as nossas empresas se orgulham de ostentar como bandeira.

Força pessoal, peguem na bandeira e nas medalhas, juntem-se ao Socrates, ao Cavaco, ao Rui Rio, ao Menezes. Mais uns litros de gasolina e aposto que davam uma fogueira impecável.

Pluggable Authentication Modules

Este trabalho serve como introdução aos Plugglable Authentication Modules (PAM), do ponto de vista da administração de sistemas e desenvolvimento de aplicações num ambiente Linux. São também abordadas as temáticas da segurança e do desenvolvimento de novos módulos. Para finalizar é apresentado um pequeno exemplo prático em como desenvolver uma aplicação PAM-aware. 

Quem estiver interessado numa breve introdução ao PAM basta carregar aqui.

From Ubuntu/Windows to Mac OS-X Leopard

I just got my first brand new MacBook and, as one would expect, some problems emerged by leaving my usual OS combo (Ubuntu/Windows) for Mac OS X Leopard. I’m still undecided whether to install Ubuntu or use VMWare Fusion to use Linux. As for Microsoft Windows as long as I don’t need to use .NET I don’t think I’ll install it. Not even with the free licenses Microsoft provides University of Minho students.

First I had to decide what to install:

The question you are probably asking is why Firefox instead of Safari!? Because the damn unsafe add-on for del.icio.us is just that: del.icio.us! I just can’t live without it. Maybe if the guys over there worked the basics of security we could say that it’s both excellent and safe! And don’t say there’s a add-on for Safari as well. I’ll only accept it if the add-on is as good as the one provided by Yahoo.

Now we go for the fun part. The problems and solving them. Your attention please, this is only fun for me when I do it on my computer so it won’t be pleasure if you ask me to fix your computer! Joana this one is for you, I know how your mind thinks.. Almost as badly as mine. Oh well, we are related aren’t we? :\ Please release those crazy Christmas photos to the world! :X

I’ll start with a small OS free tip and then go for the Q/A part. If you are Portuguese like myself you just hate all the results that google gives you from .br domains. Most of the results are overrated and most of the times you just wish that they weren’t there. If this is the case just do your normal search in google but write -br in the end. Just test this, go to google and type governo brasileiro -br. It works ;)

  1. How do I get my mouse to behave like a normal one by removing this dreadful acceleration?

    Easy. Check Rúben’s blog @
    http://blog.0×82.com/2007/12/mac-os-and-usb-mouse.html

  2. What’s wrong with the encoding on TextEdit? The automatic descovery does not work and even when I specifically tell him to use this encoding it won’t work. The Where is ISO 8859-15 dilemma.

    Still don’t know. Anyone? If you want to test the bug just do this (from here):

    $ echo é > ~/a.txt
    $ cat ~/a.txt
    é
    Open a.txt with TextEdit and get:
    È

    Cracked it! At least I have a partial fix for Migrating documents from Ubuntu to Mac OS X Leopard:

    cmd + space terminal enter

    {go to the directory where the file is}

    bash$ iconv -f ISO-8859-15 -t UTF-8 {filename} > UTF8-{filename}

    For me it was:

    bash$ iconv -f ISO-8859-15 -t UTF-8 Pam.tex > UTF8-Pam.tex

    And yes PAM is as in Pluggable Authentication Modules. So I have a latex work on that :P

    
    
  3. Where is type-a-name application? It’s not on the dock.

    Just press cmd + space and type what you are looking for. This is called spotlight. Either this or open Finder and go to applications.

  4. Why doesn’t it show my dashboard when I go to the left/whatever corner?

    Have you even configured your mac? Common.. Click the apple on the top left corner and go to System Preferences. Exposé and Spaces. And now that you are there take a look around and configure all the other things that you neglected.

  5. This computer is always underlining the words in red. (when the spelling is right :P If not you are a dumbass for asking this!)

    Just press cmd + mouse and change the language. Thanks Nuno Veloso from Apple Tech Team for this tip.

  6. How can I see the right mouse button menu?

    crtl + mouseclick

  7. PageUp/PageDown!?

    fn+ up
    fn + down

If after this you still feel like reading about Mac OS for rookies – like myself – you can check this section in Arun Gupta’s Blog or check this extensive list of Keyboard Shortcuts. Have fun!

Now let’s get back to work, something almost impossible when your doing a report on LaTeX and the encodings are never right.

One final touch: ctrl + alt + cmd + 8. Merry Christmas! :)

DB2 Express-C 9.5 Released

A new version of DB2 Express-C was made available by IBM today. As you might already know DB2 Express-C is a free dataserver without limits on database size or number of users.

We got this news from

You won’t find this new version on IBM DB2 Express-C Website, but you can download the Linux Version here and the Windows Version here.Mac version is still not available. This is probably the down side as many of us are waiting for IBM to ship a Express-C DB2 version for Macintosh. Hopefully next time?

I still didn’t tested the new DB2 but according to Antonio

Version 9.5 brings to the table a great deal of new enhancements and features. Among these there is also the reduced amount of memory requirements and the improved efficiency of operations on Linux. Oh and it will also make you rich and more beautiful. I mean, pureXML support has been greatly improved and it is a release that is sure to please many people on both Windows and Linux.

I know the t-shirt looks great. Hopefully Vítor will send me one! :P

Is Windows Vista the new ME?

Microsoft has given all the IT students at my university free licenses to almost all the software common developers use. So I have been using Windows Vista right from it’s release with satisfactory results.

Well it seems not everyone is getting the same results. I am tired of reading about companies that migrate back to XP for lack of some functionality, that companies deny to make drivers for Vista when they already have for XP, etc. Will SP1 fix all this and make Vista a better choice? For Microsoft sake it better be.

Let us see. Apple (and Mac-OS) are on the peak of their popularity yet and Linux platforms like Ubuntu give a easy to use operative system where you can do everything you normally do in Windows (and a bit more if your a coder) with a slight difference, it’s free. Many of you are unaware of this fact but when you buy a new laptop 120€ go straight to Microsoft. That about 10% of the value of your laptop. Why pay for it when you can have it for free?

Right now the Portuguese Parliament is discussing the adoption of open-source software in the public companies. The mentality is changed and personally I don’t believe Microsoft would survive a new Windows ME, there’s simply no contingency plan like they had back then. I know that Microsoft has some advantages, people are used to it, they don’t know they are paying for it, laptop manufacturers enforce Windows as mandatory, PC games are for Windows only, etc. But things have changed and I don’t know how much more time can Microsoft live of the past. If they don’t give users a a new way to interact with a computer, if they don’t trill the crowd with a new Windows, a genuine breakthrough, then it’s a one way street to nowhere.

I know a new service pack won’t change Vista as much as it is necessary to satisfy consumers. But if it succeeds it will provide Microsoft the time to rethink their strategy. If they continue to bet on the same they did 10 years ago, they will fail. And then, they will fall.

format c:\

Chegou a altura de um novo format. Com uma licenciatura em cima este menino estava mesmo a precisar.

Software:

  • Windows XP SP2
  • Linux Ubuntu
  • Firefox
  • PDFCreator
  • Cisco Systems VPN Client
  • Open Office
  • Java Development Kit
  • Glasgow Haskell Compiler
  • Avast (Windows)
  • RocketDock (Windows)
  • Joost (Windows)
  • WinRAR (Windows)
  • Visual Studio (Windows)
  • Nero Burning Rom (Windows)

CeSIUM: Free Software Mirror

O pessoal do CeSIUM criou um site mirror de software livre que tem sido um sucesso. Como conheço gente que trabalhou neste projecto, gostava de lhes dar os parabéns e, ao mesmo tempo, apresentar este website que nos fornece bons Sistemas Operativos (em alternativa ao Microsoft Windows) mas absolutamente GRÁTIS.

Conteúdos: Arch Linux; cAos Linux; CentOS; CPAN; Debian GNU/Linux; DragonFly BSD; Fedora Core Linux; FreeBSD; Freespire; Gentoo; Knoppix Linux; Kubuntu; Kurumin Linux; Linux Mint; Mandriva Linux; nUbuntu; OpenBSD; OpenSUSE; Pentoo Linux; Puppy Linux; Damn Small Linux; Sabayon Linux; Slackware; Vector Linux; Caixa Mágica.

Software Engineer at Critical Software?

Last Monday I attended an job interview at Critical Software. Had some troubles finding tecmaia facilities and got there 30 minutes late! (I know, need a GPS)

They started the interview with some general questions about my background and the work I did at Mobicomp. Then a more technical part, where I was to respond (like if it was an exam) to some questions about object-oriented design, database, Threading, Linux, C++, XML, UML, mySQL. Then a final part of the interview was reached, where my psychological strengths were measured, and I was able to speak for myself and tell them what I like to do.

This is the second interview I’d been in since summer break, the first was at Edigma.com, but that one did not went so well. It’s a shame, as I feel I would be a very good addition to that team. I know the responsibility was not entirely mine, as the interview was very bad. Had no structure, they didn’t take a single note about what I said, they didn’t have a script to follow. I could continue this list as I feel strongly disappointed with them. Don’t get me wrong what they do is cool, but the recruiting process is not.

Follow

Get every new post delivered to your Inbox.