yo dawg I heard you like package managers

Let’s say you want to do this little web project, a SPA for example, and you want to settle for Angular as your JS framework. But downloading those scripts manually is so oldskool, so you need yourself a package manager to shoot those into your still empty project folder.

For example, with something like Bower, “the package manager or the web”:

bower install angular

Cool, so how do I get Bower?

npm install -g bower

Node Package Manager huh. Hmm. So I’ll need Node first. OK. I bet there’s a Chocolatey package for that.

choco install nodejs

Awesome! So how do I get Chocolatey (we’re clearly on Windows here, use your fav *nix distro package manager otherwise)?

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

Alright, now we’re talking!
What was I doing again?

As a Windows .NET dev you could also use Visual Studio Community 2013 of course, open up the Nuget Package Manager Console and run:

Install-Package angularjs

But how do you get Visual Studio (*)?
Oh, there’s Chocolatey again.

choco install visualstudiocommunity2013

Or maybe you can use WebPi…, or… argh. Never mind.

(Post inspiration by @mattiasgeniar)

(*) As a .NET developer you have this installed already of course, but to setup a new machine, Choco is the bomb.

configuring vim: tweaking your _vimrc file

.vimrc

In my earlier post on setting up Vim on Windows I already talked about a few vimrc changes to make vim behave on windows and look a bit better.
I learned that checking out other people’s vimrc files is a great way to learn how you can configure vim to become the kick-ass text editor you always wanted. In this post I’m going to run over the settings I have in my _vimrc file to make vim work better for me. Feel free to copy bits your find useful.
If you don’t know what that vimrc file is, or how to edit it, check out my previous post on how to set things up.

I tend to document my vimrc changes with some comments. That way I still know what I was trying to do months later and or what lines can be removed when a wicked plugin makes them obsolete. Most of it is self-explanatory, so I’ll just paste them right here.

First some system settings.

" Activate all the handy Windows key-bindings we're used to.
source $VIMRUNTIME/mswin.vim

" Have gvim behave properly on Windows.
behave mswin

" Use unicode/utf-8 encoding by default for keyboard, display and files.
set encoding=utf-8

" Set a more convenient leader key on an AZERTY layout than the default backslash
let mapleader = ","

Now let’s make things prettier.
First of all, we need to set a nicer fixed-width font, Consolas in this case. Then I hide the toolbar which I never use. Then, of course, a nice theme.

if has("gui_running")
  " Set a nicer font.
  set guifont=Consolas:h11:cDEFAULT
  " Hide the toolbar.
  set guioptions-=T
endif

" Set theme.
color badwolf

Then a number of visual things to make programming, editing and searching text easier.

" Display line and column number in bottom ruler.
set ruler
" Display the line numbers.
set number
" Turn sounds off.
set visualbell
" Shows a horizontal highlight on the line with the cursor.
set cursorline

" Activate highlighting search pattern matches & incremental search.
" Incremental search means your cursor will jump to the first match as you
" type.
set hlsearch
set incsearch
" Allow using  to kill the current search highlighting.
nnoremap   :nohlsearch

" Activate case-insensitive & smart case search (if a capital letter is used
" in your search query, Vim will search case-sensitive).
set ignorecase 
set smartcase

" Set wildchar visual completion awesomeness.
" This is enhanced command line completion and it rocks.
set wildmenu 
set wildmode=full

" Turning on line wrapping and line-break for easy text-file editing.
" Line-break wraps full words at the end of a sentence for readability.
set wrap
set linebreak

Programming settings. Who would have thought!
Tweak tab settings according to your religious preference of course. I can’t say I have used the folding a lot, but these settings come from another .vimrc somewhere and they seem sensible.

" Activate syntax highlighting.
syntax enable

" Set tabs to 4 characters and expand to spaces, activate smart indentation.
" See tabstop help for more info.
" Setting tabstop & softtabstop to the same value to avoid messy layout with mixed tabs & spaces.
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set smartindent

" Enabled folding on indent level. That way it works on any code & html, xml
" etc. 
" Setting foldlevelstart ensures that for newly opened files folds are open
" unless they are 10 levels deep.
set foldmethod=indent
set foldenable
set foldlevelstart=10
set foldnestmax=10      " no more than 10 fold levels please

At the end of my vimrc I add my custom tweaks. They might not be useful for everybody, but they work well for me.

First, some syntax highlighting for file types vim doesn’t know about by default for .NET development.

" Set syntax highlighting for some .NET file types as XML files, cause that's what they are really.
autocmd BufNewFile,BufReadPost *.config set filetype=xml
autocmd BufNewFile,BufReadPost *.csproj set filetype=xml
autocmd BufNewFile,BufReadPost *.sln set filetype=xml

Then, some key mappings to access plugin features or plain vim commands quicker.

" Add a mapping to open a new tab with CTRL-T.
map  :tabe 
" F11 toggles menu visibility
nnoremap  :if &go=~#'m'set go-=melseset go+=mendif

" cd sets path to the path of the file in the current buffer.
nnoremap cd :cd %:p:h
" Open the NERDTree on the path of the file in the current buffer.
nnoremap t :NERDTree %:p:h

That’s about it. I hope this helps getting your own .vimrc set up the way you want it to. I’m not a vim expert so there are probably better ways to do some of these things. I you know how, feel free to let me know in the comments. I’m eager to learn some nice vim hacks.

As I said before, don’t just copy paste stuff in your vimrc you don’t understand. Take a look at the vim help first. Also check out other people’s vimrc and see how they do things. There are plenty of good blog posts around on the subject and a github search turns up some good stuff too.

why an open sourced .NET framework is huge

free

I was already excited about the recent ASP.NET vNext developments. Things like the fact that you can get the ASP.NET source code on Github, that it’s completely FOSS and that it’s disconnected from the rest of the .NET stack are just plain awesome.

A huge step for ASP.NET vNext is that you don’t need Visual Studio to write software with it. You can use your favourite text editor like Vim, Sublime, Emacs or whatever you like, together with a number of open source command line tools.

A second huge thing is that ASP.NET 5 can now run cross-platform using Mono on Linux and Mac. Not only can you use your development tools of choice to write and build your C# code, you can also do it on the OS of your choice. .NET everywhere. Think about it. *mind blown*

Yesterday however, things got even sweeter as Microsoft is now releasing more of the v5 .NET Framework as open source. This means more and easier cross-platform development and Mono compatibility (as the source can be easily integrated in Mono) for .NET code.

On top of that there is now a new Visual Studio Community edition of Visual Studio available for free. This is equal to the Pro version, so you can ditch those crippled free “Express” versions and write code in the tools you’re used to professionally. I love this one. I’ve messed around with SharpDevelop and the Express version, but if you’re used to the “real thing” it feels like having to work with your hands tied behind your back.

As if this wasn’t enough there’s a bunch of other cool improvements too, like getting only the .NET framework components you need for your project and pull them in using NuGet. Scott Hanselman sums them up nicely.

So if you’ve always wanted to check out .NET or C# but didn’t want to because you had to run it on Windows and in Visual Studio, there’s nothing holding you back any more. For .NET developers this is great. It gives us more freedom than ever without having to learn a new language and framework. For people hacking away on OS X and Ubuntu with Ruby, Python etc. because they want to use FOSS, this is an opportunity to dip into the wealth of .NET resources out there and try something new.

The strategy is clear. They want everyone to use the .NET framework, they want everybody to run that code on Azure (even if you’re not using .NET) and they see that making it open is the only way to get there. Great times are ahead.

the 10+ android apps I use the most

Smart Launcher 2 for Android makes your home screen look all nice and minimalWell look at that. It’s time for another of my most-frequently used and super useful Android apps roundup! I’ll be comparing to the list of 2010 (whooosh, where did time go) to see who’s still around and who dropped off.

  1. The browser. I’m using Chrome now, cause it’s faster and uses less memory than Firefox. Sorry foxy, but I still use you the most on the desktop! I stopped using the stock one because it doesn’t get updates and that’s just not safe any more.
  2. To get quick access to any power toggles I now use Power Toggles from Painless Apps. The best thing here is that it allows you to dock the power buttons you want in an extra notification bar, so it fits right in with the notification bar the OS provides by default. This also avoids clutter on your home screen, which I like.
  3. For note taking I’m not using a specific app any more. I resort to plain text files now because they are easy to sync with Dropsync and also edit with the Dropbox app (and more, see later).
  4. SimpleTask cloudless is my todo-list app. It uses the portable and future proof todo.txt format, which means my todo list is a mere text file synced to the cloud (see #3) and editable with any text editor. You can also use the SimpleTask app which automatically syncs with Dropbox, but I’m already using Dropsync for that.
  5. FBReader is still my eReader of choice, together with Instapaper app for any read-later articles collected online.
  6. The Tiny Tiny RSS app is my Android RSS reader client, but you need to host your own Tiny Tiny RSS RSS reader web app to be able to use that, so it’s probably not for everyone.
  7. Tweedle has become the twitter app of choice. It’s slick, it has tabs and it’s fast. Can’t remember exactly why I dropped Tweetdeck. I think it broke down or got really slow at some point.
  8. I like minimalism when it comes to launchers. Before I used Zeam Launcher (no longer under development unfortunately) or the stock one, but now I’m using  Smart Launcher 2 for a while and quite like it. It takes some getting used to, but it’s super minimal and original.
  9.  ES File Explorer is an extremely handy system tool. This “file manager” app is way more than just that. Next to exploring your internal and SD storage It allows editing of text files, open zip archives and has a music player and image viewer built-in. It gives you access to cloud services, FTP or network drivers if you want. You can even use it to share files over it’s built-in FTP server. Other features like a task manager and app cache cleaner makes this a must-have app on any Android phone.
  10. Bittorrent Sync just has to be in here as well. If there’s one tool that makes syncing large amounts of files between your phone and a PC a breeze without needing the cloud, it’s this one.
  11. AutomateIt Pro is my automation tool. Change sound levels when at home or work or late at night, start my music app when I connect headphones, turn on wifi & sync when I plug-in the charger. It takes care of all these little tasks for me.

Anything awesome I should be checking out? The comment box is awaiting your wise words.

here’s some ambient and other electronic music

Checking some emails containing news beats and sounds lately I came across some nice finds. The brothers of Somatic Responses are pumping out electronic music albums like the things grow on trees judging from their bandcamp page. Some stuff is great, some stuff is less to my taste but it’s always on the edge, dark and breakcory and glitchy.

Their last album Obscure the Future however has nice, chill ambient tunes on it instead of the usual hectic beats and harsh sounds. So if you are looking for something more easy-going yet deliciously electronic, this might be just it. Perfect value for your money as you can name your own price for most of their albums. Nice.

Another great find comes from Kaometry records, pushing interesting and quality electronica/breakcore/drum’n’bass/experimental stuff for quite a while now. They publish across the full electronic spectrum (or at least the interesting more beat-driven part of it) so it’s worth checking out.

Came across this particular drum’n’bass gem in one of their more recent albums Méta-Féeries

They have some free downloads on their website (see downloads), a shop on bandcamp and a lot of streamable music on soundcloud.
Check em out if you’re up for some new beats.

free dj hidden and limewax download

music

Free tracks are always nice, and especially if they are from hardcore drum’n’bass artists like DJ HIdden & Limewax.

To celebrate 30k fans on Facebook the lads at PRSPCT recordings have a free download up on Bandcamp with DJ Hidden’s The Resonators, Limewax’s Pain and a Resonators VIP remix by the Outside Agency. Nice.

Go get em, and don’t be a cheap ass. ;)

Photo by Craig Cloutier, cc-licensed.