Monday, 31 December 2012

Flattering 2011-2012

My  http://flatr.me/ and https://flattr.com/ list 2011-2012

Oswald Buddenhagen for mbsync
SMBC
John and Hank Green
and
https://supporters.eff.org/donate

The teams over at:

serverfault.com (and all your other sites)
github.com
tineye.com
Free DNS
www.realservers.info

blog.joel.co.uk
blogger.com 
OnlineGoServer
cpan.org
radicale.org
tangoGPS
wikipedia

and last but not least - google.com

Friday, 14 December 2012

Notice dev cycle

Some of you will know Notice and some may wonder how it is developed. You may also wonder how to connect distributed versions of git so that you can just push changes between clones.

I have a desktop, a server and github.

desktop Notice branches:


  arch
  client_012
  client_013
  github
* master

server Notice branches:

  master
  github
* live

github Notice branches:

 * master

What are these and how do they link? The desktop master is where I do all of the development. Anything that can go public gets checked out into github and pushed to the master branch on github. If I have a client that needs a copy of Notice then I fork the master branch, ( with my internal code for that customer as the branch name); add their logos and changes and link that to their server, (more on that shortly.)

Rather unsurprisingly I use Notice for my own production server. The desktop master branch is linked to the server master branch. Any time I issue

alexx@desktop:/v/www/s/github/Notice$ git push

github is updated with the github branch and
the server is updated with the master branch. It does not go live.

Over to the server. The sysadmin, (a quick wardrobe change via ssh) on the server merges in the master branch, or if that will break things, (this is production) then cherry-picks or 

git co master -- single/files or/more

The configs

on the desktop:

# cat ~Notice/.git/config

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "server"]
        url = ssh://alexx@server.alexx.net:22/var/www/sites/Notice
        fetch = master:master
        pull = master:master
       push = master:master
[remote "origin"]
        url = git@github.com:alexxroche/Notice.git
        fetch = master:github
        pull = master:github
       push = github:master
[user]
        name = Alexx Roche
        email = your_email@example.com
[branch "github"]
        remote = origin
        pull = master:github
        push = refs/heads/github:refs/remotes/origin/master
 [branch "master"]
        remote = server
        pull = master:master
        push = refs/heads/master:refs/remotes/ns0/master
       

# This shows that push can be local-branch:remote-branch or the more complicated git style

on the server:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = git@github.com:alexxroche/Notice.git
    fetch = master:github
    pull = master:github
    push = github:master
[user]
    name = Alexx Roche
    email = your_email@example.com
[branch "github"]
    remote = origin
    pull = master:github
    push = refs/heads/github:refs/remotes/origin/master
    #merge = refs/heads/github

Github has the public ssh keys from my desktop notice account. 

Now this may be because I came from a cvs/svn world, but without a central repo, (like gitolite) it can feel hard to define which is the authoritative version. (Also with the ease of branching and cloning I ended up with over 25 copies of Notice on four computers and two usb flash-drives, each with a few changes and some of the copies.) Now that I've merged them all back together, I've got my version control under control, and I'm getting more used to the idea that the definitive version depends upon which branch you are talking about. If you think that I'm going about this in the wrong way or know of any improvements then explain in the comments. 

Monday, 10 December 2012

Hackers, Crackers, Slackers

I think of myself as a hacker. I know enough to be useful and that is a super-set of, "enough to be dangerous." [0] In private that is how I would describe my computer skills, but publicly we have a problem. Us computer artisans are known in the public media as hackers if we break the law, (or cause a nuisance.)

Some of the hacker community wanted to distance themselves from negative activity without relinquishing their title, so they came up with the term Cracker for Crazy-hacker, (not really, more like probably "work for organised crime or spam-lords" but W.O.C.O.S.L. didn't catch on. )

While looking for a javascript user-data lib I found a blog entry by Constantine. This reminded me of Neuromancer. (OK, so we call them firewalls rather than ICE - though I would have liked that, we already have enough TLAs in my world - Gibson got a lot of it right.) [1]

So I thought to propose we have three scales:
    Wintermute scale is how law abiding they are. (Fully WM would should be imprisoned.)
    Neuromancer is how powerful someone is, (Neuro, is top of the scale.)
          and
    H.Case is how good/kind they are.

Then I realised that
  1. Language evolves rather than is created or forced
  2. I'm just re-creating role-playing character alignment, (and not very well.)
  3. I've tried this before with 
So how do we get hacker = lawful;good and cracker = chaotic;evil ? Add your ideas to the comments.


[0] I've often met script-kiddies who, "know enough to be dangerous, but not enough to be useful".
[1] Though I still prefer Snow Crash, (thanks Shish).

Can you teach me to be a hacker? 2.0


In version 1.0 I talked generally: Learn languages; use them; GOTO :

Here I want to plant my flag. Learn BASH C/C++ python postgres lisp and LFS.

(Oh no, not another arbitrary list from another hacker?) Well not quite. I should clarify that I'm a Perl and C++ hacker. I've been a sysadmin and a netadmin, (I loves me some Foundry/Juniper.) I'm not saying that you should not learn perl, but python is going to replace both perl and ruby in the next few years. (What? How can you defend that statement? Time.)

Why is BASH on my list? Why is it BASH and not Bash, (or BaSH?) Because I feel that BASH can teach you everything that I learnt from BASIC, but can also teach you about functions.

LFS? What is that? Linux From Scratch - find it. Do it. I was using Slackware back in 1998 so LFS wasn't a huge leap for me. Those that have only every used CrunchBang or CentOS are in for a surprise. For me LFS was something to do or try. I live on CrunchBang and my servers are CentOS.

Lisp? Isn't that a teaching language? Yes! Yes it is - and though you don't know it, you need to get taught. As the great Ludwig Wittgenstein said, "The Limits of my language are the limits of my world."
Each language has a number of operators, (e.g. + - * /) that you are going to use and were created by the author of the language; even with ASCII there is a limit to the number of operators. With lisp there isn't a limit. That is just part of the story, but when you really understand and find yourself quietly mouthing, "No limits?" Then you have learnt something. (In practicality you can get far with just 50, which is why perl and C++ work for me.)

If you advocate Lisp why C/C++? C is the Latin for most modern languages. (I can hear your indignation from here! No not you, I know you agree with me, I'm talking about that other guy.)

What postgres? That isn't a language? No, strictly it is a database project, but if you get used to it then mySQL, SQLite and any lesser system will not be a problem.

Why isn't $your_language on the list? Because it is rubbish. If you want to get paid for sitting at a desk poking at keys then sure - learn some Microsoft or Oracle stuff; but if you want to actually get things done then Lean perl.

About this blog

Sort of a test blog... until it isn't