How to write classes in Javascript

November 14th, 2012

I am not doing yet a write up on how to write classes in javascript; instead I just link to the one stop shop by Douglas Crockford.  It contains examples and explanations.

By the way – if you are serious about Javascript; do read his book.

Search programs and files is lost in Windows 8 – and a bit clumsy workaround

November 1st, 2012

The Search programs and files command doesn’t work as good in Windows 8 as Windows 7 or Vista.  In fact, it only does a fraction of its predecessor.

As a developer I often manipulate windows services and hence use the Services app in Control panel.  In Win7 I just press the windows button and write services.

One can find Services in Windows 8 too but it doesn’t come as easy.  One has to start searching (just press a letter at the start screen) but then choose to search in Settings through pressing arrow-down arrow-down enter.

I have a workaround to find Services and it is to go through the normal Control panel->Administration path and copy the Services shortcut.  I then pin this shortcut to Windows8 start screen.
Next time I want to open the Services I just write services and hey presto – it shows up in the search result.

One can do this for the usual programs one wants to get to.

It took the original start button over 10 years to develop into what it is today.  I don’t blame Microsoft for not getting it right at first try and I look forward to future refinements.

Logging WCF

October 22nd, 2012

If you have a WCF solution it is quite easy to log the calls.  (probably not always but it worked for me)

I used http://stackoverflow.com/questions/9232819/wcf-tracing-seems-to-be-truncating and http://msdn.microsoft.com/en-us/library/ms730064.aspx as info.

 

Compulsory Cow – F/OSS lib for safer string.Format(…) calls

October 4th, 2012

I recently released some Dotnet open source functionality for doing safer string formatting.

Think like this:
When formatting strings in Dotnet C#/Vbnet string.Format is handy. But it always carries the risk of failing runtime when the format string is incorrect.
When you are doing (error) logging with strings (in a file) you want the logging to proceed without failing. Ever.

SafeFormat(…) or it’s extension variant “…”.SFormat(…) does just this. It formats exactly as string.Format does (it uses string.Format internally) but in case of a wrongly formatted format string it doesn’t throw an exception but instead does as good as it can and outputs the data it can gather together with a comment that something is broken.

Get all the shiny here: https://github.com/LosManos/CompulsoryCow

Mina 2 presentationer på OpKoKO

September 27th, 2012

Jag höll 2 presentationer på denna höstens OpKoKo, bägge 10-minuters blixtintro.  En var om Netduino och en om grafdatabaser i allmänhet och Neo4j i synnerhet.

Till Netduino-föreläsningen finns en presentation (det som ofta kallas “en powerpoint”) men till Neo4j inte.

Communicate, communicate, communicate – and lots of stuff to come

July 30th, 2012

hejdig.

Lots of new stuff has happened since I last time sat down to jot down some thoughts.

Windows 8 has gotten a release date. I look forward to the new user interface which is the result of hard labour on how to prepare for the future while still holding the pleased-with-the-present crowd. Clueless IT-departments will use Win8 to update to Win7 but they are a dying race anyway. Clueless IT-departments I mean; soon the business part of organisations will take the rudder back. And out source IT. And get burned again.

If you get Contradictory info about the new user interface:
The new user interface consists of two parts, both the new Metro which is preferable on tablets and in the meeting rooms. Then we have the regular Aero interface which remains about as today.

Windows phone 7 will be upgraded to Windows phone 8 and I have heard it has left the WinCE code base in favour of the true Windows8. I can’t say now how that will change the future but I will certainly have when I can.

Azure, the Microsoft flavour of the cloud, is already updated with true virtual machines and the possibility to open a VPN to your own network. Best of both worlds. Sharks with laser on top of magic unicorns.

Which brings me to Google goodness. I haven’t heard about wild new stuff regarding their cloud but instead they have created a media centre called Q. It has no user interface of it’s own but needs an Android device and NFC. The new Nexus7 tablet for instance. It’s a 7″ tablet with quite a lot of horse power for 200€. It would have been a perfect christmas present to accompany my Ipad if it wasn’t released in the autumn. By christmas it will already be in my household.

Google Glass has been presented but only as developer beta and at a hefty price tag.  Google Glass is a pair of glasses frame with Android, GPS, communication possibilities and HUD. If you are among the Cromagnons thinking a Bluetooth headset is ridiculous; wait till you see this one!

What about the Java world? Well… I am still waiting for it to implement LINQ. I am waiting so much that I have installed Neo4j on my Mac but is using it from a Windows client.

What about the IBM world? I don’t know. The Notes developers seems to prefer playing by themselves. I guess there’s some cross pollination, or should I say cross contamination? between the scripting nature of Notesscript and the scripting languages of the world and between the Notes database and the document databases of the world. Personally I don’t touch it unless forced to.

Scripting world?  Still no sight of strongly typed variables.

/OF

—-8<—-

  1. CODE AND DEVELOPMENT
    1. Moveable types – open source fonts
    2. Choosing font size – get help from Lucas sequences
    3. MVC, MVP, MVVM on WPF (win)
    4. Make the intellisense popup in Visual studio transparent (win)
    5. Code review the Stackexchange way
    6. Jquery soon to drop IE<=8 and Chrome on Ipad is really Safari
    7. Itext – A F/OSS/dual license solution for creating PDFs
    8. NDC2012 – Norwegian Developers Conference
    9. Google blockly – graphical programming language
    10. Hackerspaces in Sweden and the world
    11. Plucked HTML5 audio editor and Threeaudio.js visualizer – audio on the client (web)
    12. Integrate JavaScript into your development workflow
    13. CSS tutorial/documentation (web)
    14. VsVim visual studio extension (win)
    15. Hack your workspace
    16. Why the browser user-agent looks like it does
    17. The fold – does it really exist? (web,design)
    18. SEO for developers (web)
    19. Simulating Iphone browser in Windows (win,web)
    20. Hack and test snippets online (web)
  2. PROJECTS AND LEADERSHIP
    1. Tips for making the adoption of agile successful
  3. PRODUCTS AND RELEASES
    1. Petzold Book Blog – An Experiment in Book Publishing
    2. Ipoo – for what you do – when you’re in the loo (iphone)
    3. Shopgun – mobile app for checking how ethical and healthy a product is (android,iphone)
    4. Refiddle – online regex editor for javascript, ruby and dotnet (web,andmore)
    5. Top 10 Raspberry Pi Myths and Truths
    6. Suggestions site for your customers
    7. AIS transponder for 8€ (iphone)
    8. Self-publish your in-progress book for great royalties on Leanpub
    9. 99 USD hackable Android game console (android)
    10. Grub2 – a bootloader
    11. Windows phone 8 (winphone)
    12. Normalize.css – instead of resets (web)
    13. Peity – draw graphics in jquery (web)
    14. Mighty moose – a TDD continous test tool – now free (win)
    15. Book: Pro application lifecycle management with Visual studio 2012 (win)
    16. Introduction to Rx – a book (dotnet)
    17. Learn git hands on in a bunch of minutes
    18. Nemerle – OO, FP, metaprogramming all bundled in dotnet (dotnet)
  4. SECURITY, PRIVACY AND RIGHTS
    1. Some Facebook games no longer ask permission to access your profile information
    2. Tracing on the web and DuckDuckGo (web)
    3. Clemency petition (nådeansökan) for Peter Sunde
  5. MISCELLANEOUS
    1. Lego makes Minecraft
    2. How to not buy a used car
    3. Makies – configurable dolls
    4. Teaching your kid to code – why?
    5. House on stilts
    6. Album covers
    7. Laptop bag that transforms into a chair and a desk (design)
    8. Google maps/street view inside Pompei and in Antarctica
    9. Run training app – with zombie love
    10. “That’s not stupid”
    11. Finally, a line of fan gear for people who hate sports

 

Code and development

Moveable types – open source fonts

You like fonts?
You like free?
You like rolling your own font and participating in a community?
AFAIK Moveabletype is the best known hub for this.
– http://www.movabletype.org/

 

Choosing font size – get help from Lucas sequences

If you are a font geek, don’t read any further you will only get angry.  Or disappointed.  Or both.  Just like colour geeks were when I wrote about tools for choosing colours.
Say you have carefully chosen a font for your new site.  Now you have to decide on size.  Correction.  Sizes.  Because you do have head lines, body and side panels and the legal stuff below, don’t you? and they all have different font sizes.
Just like there is a golden ratio for picture composition there is one for font sizes and just like the golden ratio can’t be applied mechanically to get a stunning result so can’t the Lucas         sequence on font sizes; but it can give you a head start.
The Lucas sequence is a more generic Fibonacci series and that is where I leave off.  The rest is in the article.  And possibly with a clever CSS3 hack.
– http://www.webdesignerdepot.com/2012/06/sizing-type-with-lucas-sequences/

 

MVC, MVP, MVVM on WPF (win)

The MVC pattern is all the black now.  Well… it has been for a while so its blackness has been slightly washed out.
Also: I was not very fond of MVC when I heard about it.  To be honest I didn’t understand it because in my mind I pictured a different image.  This different image turned out to be MVP it turned out.  I believe the MVP pattern is clearer in dependencies.
MVVM is a love-hate for me.  I like the lack of dependency.  I hate the lack of compile time control.  Tooling like Visualstudio/WPF remedies some of that but not fully.  I want to go straight from dev to prod and with MVVM I have an uncontrolled area that has to be (manually) tested each time.
WPF is all love.  It is what HTML would have been if HTML had been created for what HTML is used for.
Below is linked an article about all the abbreviations mentioned.
– http://msdn.microsoft.com/en-us/magazine/hh580734.aspx

 

Make the intellisense popup in Visual studio transparent (win)

I someone gets the trick below to work please tell me.
If you work with Visual studio – do yourself a favour and follow the blog. It contains lots of good tips for making Visual studio a more effective tool.
– http://nilsnaegele.wordpress.com/2012/06/29/tip-252-you-can-make-the-statement-completion-window-transparent-3/

 

Code review the Stackexchange way

Code review is considered good.
But what if you don’t have anyone to review your code because you are alone?
Enter Codereview at stack exchange.
This is an online way to <drumroll/> code review.
I have browsed some entries and believe it can’t be used for reviewing a whole file but should be used more for functions or algorithms.
– http://codereview.stackexchange.com/

 

Jquery soon to drop IE<=8 and Chrome on Ipad is really Safari

Jquery1.9 (present version is 1.8) will be the last version supporting IE6,7,8. The API will remain the same at least to version 2.0.

Chrome on Ipad is really Safari with new GUI.

Itext – A F/OSS/dual license solution for creating PDFs

Creating PDFs programmatically is painful. Itext is a dual license lib that might do it for you. IIRC it works for both Dotnet and Java.
– http://johnnycode.com/2010/03/05/using-a-template-to-programmatically-create-pdfs-with-c-and-itextsharp/

 

NDC2012 – Norwegian Developers Conference

More skilled people than I have said that NDC is among the best developer conferences worldwide.
If you weren’t there you missed it. This year.
But don’t despair – the link below leads to the agenda and some digging should give you casts.
– http://ndcoslo.oktaset.com/Agenda

 

Google blockly – graphical programming language

Trying to learn someone to program first involves teaching the syntax, what the curly braces, the semi colon and the parentheses do.  Too me they are part of the pattern but to a newcomer they are obstacles.  Why do we need them?
Why not simplify it for noobs?
I have tried one of the old (like win95 old) programming languages for robot lego and was flabbergasted of how easy it was to make parallel tasks.  Something I can do in dotnet with lots and lots of hard-to-read code. (less hard-to-read with dotnet 4.5)  Google has now created another graphical programming language called Blockly.
I don’t think it is useful for us who make a living on code but it might, I say might, be the Rosetta stone for newcomers who want to learn but not enough to grok the curly braces.
– http://www.wired.com/wiredenterprise/2012/06/google-blockly/
– http://code.google.com/p/google-blockly/      <- play with it – solve the maze
Tipthanks JSandén

 

Hackerspaces in Sweden and the world

A hackerspace is a meeting or meeting place for hardware hackers.
– http://hackerspaces.org/wiki/Sweden

 

Plucked HTML5 audio editor and Threeaudio.js visualizer – audio on the client (web)

HTML5 audio editor and a javascript lib for making 3D out of sound. Beta and developer version respectively. Still impressive.
– http://badassjs.com/post/27056714305/plucked-html5-audio-editor-and-threeaudio-js

 

Integrate JavaScript into your development workflow

Unit tests. Functional tests. User interface tests. Integration tests.

They all work differently and integrate into the development workflow, continuous integration and the source code repository differently.

 

Below is linked information about how to integrate. Examples are mainly, but not limited to, TFS.

 

– http://www.infoq.com/news/2012/07/javascript-test-vs

 

CSS tutorial/documentation (web)

Below is linked a quite good CSS tutorial/documentation. It isn’t a tutorial 1-2-3-4-… but it isn’t proper documentation either. It is more of what I am looking for instead.

– http://css.maxdesign.com.au/selectutorial/

 

VsVim visual studio extension (win)

People who know me know that I am all into keyboard shortcuts. A month ago I met a compelleague who bet med hands down through using Vim settings in Visual studio. Where I looked as a cool hacker he looked like a virtuoso.

– http://visualstudiogallery.msdn.microsoft.com/59ca71b3-a4a3-46ca-8fe1-0e90e3f79329/

 

Hack your workspace

In the kitchen – do you cut the bread with the serrated knife because it is easier to cut through the crust with it?  When you cut a tomato, do you first make a hole in the skin of it to aid cutting?  Do you keep your knives sharp or do you change them once every ten years?
Read the question like this:  Do you write documentation in MSWord or have you searched for a better tool?  When you work with the application you are developing – are you logging in every time?  When you debug a web application in dotnet – do you press F5/play and start from zero or do you enter your debug state through attaching directly to the web server?
Read the above like this: Do you spend your time at work with getting older while doing what you’re told or do you hone your skills to further help your customers and in the end get a better salary?
Below is linked a text by a chef where he is writing about his working place.  He makes sure his tools are sharp and work nicely with him.  Are you?
Below is also linked to a site where people can present their working desks.  Look at SHanselman: “you can always spend money on a chair” and his blazing fast computer.  Hey! – it is your main working tool, why should it be other than blazing fast?
– http://chris.ilias.usesthis.com/
– http://coderwall.com/p/t/hackerdesk

 

Why the browser user-agent looks like it does

This article might seem trivial but it finally cleared my confusion about all the inter-browsers’ Mozilla notation. Written in a very entertaining way!

– http://webaim.org/blog/user-agent-string-history/

Tipthanks MAnaya

 

The fold – does it really exist? (web,design)

The fold is what is below your screen in a web page. Is it true that people don’t read what’s written there? Of course not I say. Of course not someone else says. That and some arguments about it is found through the link below
– http://iampaddy.com/lifebelow600/

 

SEO for developers (web)

SEO, Search engine optimisation, is right down there with toothbrush ads and link harvesting sexyness. Unfortunately I believe I am in a position to have to read up on it once in a while and the link below has some info on the subject without scoring too high on Buzz word bingo.
– http://www.webdistortion.com/2012/07/14/seo-for-developers/

 

Simulating Iphone browser in Windows (win,web)

Running a iPhone browser in visual studio needs Web matrix is linked below.

Another site with some tricks to simulate the browser is linked below too. It isn’t 100% since it is really your browser but with some tricks to make it more Iphone-like.

– http://www.hanselman.com/blog/SimulatingAnIPhoneOrIPadBrowserForASPNETMobileWebDevelopmentWithWebMatrix2OrVisualStudio2012.aspx

– http://www.testiphone.com/

 

Hack and test snippets online (web)

Sometimes testing out an idea requires a whole lot of pre work with downloading and setting up libs.
This is where Jsfiddle comes in on the web front. Loading a special version of a framework be it Mootools, Jquery, extJS or one of the other 20+ frameworks supported is a breeze.  Then play with HTML, CSS/LESS, JavaScript at will. The result can be stored in a PasteBin sort of way for collaboration or as example.
Codepen does approximately the same. Why not try out Coffeescript, Less, Scss or Sass? The HTML can be done through HTML (of course), HAML, Markdown or Slim. It also has an integration with Github.
<interlude>
Talking of Github. Have you noticed it is used for more than code version management? It tries to be a social world around Git but has also managed to be a-sort-of database for some webs and a simple storage for snippets to present as blogs.
</interlude>
Jsbin is a simpler version. It does a few Jquery libs and I would have praised it if not others sites did the job better.
Tinkerbin can use Sass and Less, Haml and Coffeescript but doesn’t do any libs like Jsfiddle excels in.
Tinker is somewhere between Tinkerbin and Jsfiddle but with a simpler GUI.
Dabblet only does HTML and Sass. Since everything is client side I dare to guess that it can do javascript inlined in HTML but don’t bother to test.
Cssdesk is, as the name implies, made for tinkering with CSS. If it is better at this than the other sites I cannot tell since I am a noob at CSS.
– http://jsfiddle.net/wQ39k/76/
– http://codepen.io/pen/
– http://jsbin.com/#javascript,html
– https://tinker.io/
– http://dabblet.com/
– http://cssdesk.com/

 

Projects and leadership

Tips for making the adoption of agile successful

Below is linked 10 tips for adopting agile methods. I immediately want to add an eleventh “Buy in from leaders and wallets.” I have been in too many scrummerfall projects where the leadership calls it Scrum.
– http://www.infoq.com/articles/ten-things-agile-adoption

 

Products and releases

Petzold Book Blog – An Experiment in Book Publishing

CPetzold is known for his books Programming Windows. Earlier a must-read for any Windows programmer. He has also written Programming windows phone 7 which Microsoft bought and let free for downloading. And then written many more.
Lately he has noticed that being an author is not like in the old days when every programmer of class had a book shelf. Today we instead have g-o-o-g-l-e-.-c-o-m hard wired into our hands’ muscle memory. So what does he do? Scream fraud and murder like the music and film distributing business do or adapt? Follow the link to his solution of pre order and a feeling of being in a community.
( He has written a book Code which is about the code that makes up our computers. It is not a programming book like his others but read worth if you like reading. If you are looking for a master piece on the other hand look at the book Code by Simon Singh; the guy that wrote the even better Fermat’s last theorem. )
– http://www.charlespetzold.com/blog/2012/05/An-Experiment-in-Book-Publishing.html

 

Ipoo – for what you do – when you’re in the loo (iphone)

We have all been joking about ridiculous tweets and facebook updates.  Someone took that further and built an app for that.

 

– http://designtaxi.com/news/352768/Mobile-App-That-Connects-You-To-Other-Pooers/

 

Shopgun – mobile app for checking how ethical and healthy a product is (android,iphone)

Ever stood between your super market’s aisles, looking at two products and wondering which to buy?

The price is easy – in Sweden we normally have comparable pricing marked at the shelf.
The ethical viewpoint is worse.  There is no sign saying “built by childrens’ hands” or “this piece of meat is halal and hence the animal was tortured to death” or “this ecological mark is made up by ourselves”.
This is where Shopgun comes in.  Its an app running on Iphone and Android and it can convert the EAN code to a simple 3-colour scheme, red, yellow and green.  Just fire up the app, photograph the EAN code, watch the lights.

At the time of writing it only works in Sweden.

 

Refiddle – online regex editor for javascript, ruby and dotnet (web,andmore)

There are many gratis online regex editors/playgrounds out there.  Some are better than others and some have special features.  This one makes it easy to toggle between regex engine from javascript, ruby or dotnet.  The first I know of that does those three.  You can share regexes publicly or keep them private or not at all.  Public regexes are searchable.  Each language has some help (i.e. checkboxes) for the global parameters that are unique for each language.  Finally there is some colour coding help.  The GUI is a bit laggy and I stumbled upon at least one bug but it saved the day for me never the less.
– http://refiddle.com/

 

Top 10 Raspberry Pi Myths and Truths

A few fast bullets about Raspberry Pi; what it can and what it cannot.
– http://www.hanselman.com/blog/Top10RaspberryPiMythsAndTruths.aspx

 

Suggestions site for your customers

You want feedback from your customers.  Do you help them giving it to you?  Do you help your customers giving each other good ideas?
Before I start writing about building a community around your product let med stop at the first gate; the suggestions possibility.
Instead of coding it yourself, let a site like Uservoice handle it for you.  They have gratis version but if you, like Microsoft, want more bang you have to pay.  Probably still cheaper than writing and hosting it yourself.
– http://www.unit4ideas.com/     <- uint4ideas for agresso, I haven’t figured out the software behind their site
– http://www.uservoice.com/
– http://visualstudio.uservoice.com/forums/121579-visual-studio     <- visual studio suggestions site at uservoice
– http://visualstudio.uservoice.com/forums/127959-visual-studio-lightswitch      <- uservoice for visual studio lightswitch, incorporated in other site

 

AIS transponder for 8€ (iphone)

An AIS transponder is a boat thingy that is normally way more expensive.
This solution requires an iPhone and I can’t say what more of hardware it requires but the price should any way (disregarding the iPhone) be lower than a dedicated machine.
A “real” AIS transponder fetches/sends its data by VHF.  This solution fetches it from the internet.  That also means it can only be used close to land and 3G masts.  Just to clarify: it is a transponder which means it also sends data.
Train spotters ehm Boat spotters out there already know there is a site with AIS data visualised; I guess the site and the app uses the same data source.
What I like about it is the use of cheap electronics.  I say that all naval electronics are still too expensive and that there is too little DIY.
So here is what someone handy can do:  Get the VHF circuits (standard components = cheap) and connect it to an Arduino.  The Arduino then runs an ethernet shield to talk to the 3G router you have on board.  The Arduino is about 25€s and the shield should be about the same.  The 3G/Wifi router is 100€s but it is the same you have in your summer house or regular apartment.  Don’t have a 3G/Wifi router? – order a Raspberry Pi (30€ IIRC) and either hack together your own DHCP server or hammer the web for one.
Then you have a Wifi enabled boat with and AIS transponder.  What is there more to ask for?  I mean… with Wifi you don’t need good weather.
– http://www.yacht.de/ausruestung/neue_ausruestung/ais-transponder-fuers-iphone/a72339/bild/3036965.html
Tipthanks Lasse

 

Self-publish your in-progress book for great royalties on Leanpub

The publishing process is long and slow. But it doesn’t need to be.

Leanpub tries to make publishing simpler, cheaper and faster. It also provides the possibility to publish books in beta format; something the publishing houses have decided is impossible.

Check for instance it ROsherove’s book in the making about leadership. It strives to be the first stop for experienced-programmer-having-become-a-technical-lead, a situation that according to ROsherove doesn’t have any book so far.

– http://leanpub.com/

– http://leanpub.com/elastic

 

99 USD hackable Android game console (android)


We have learned that open computers are totally doable. Now someone takes a stab at a hackable gaming console.
I say why not? We use leisure games at our phones tablets and even computers do why not at the telly?

It passed Pebble as record breaker at Kickstarter so there is a good chance it will be released.

– http://mobile.theverge.com/2012/7/2/3134004/ouya-a-99-hackable-android-game-console-designed-by-yves-behar
– http://www.gizmag.com/ouya-android-games-console/23266/
– http://www.kickstarter.com/projects/ouya/ouya-a-new-kind-of-video-game-console

 

Grub2 – a bootloader

Now version2 stable.
– http://www.phoronix.com/scan.php?page=news_item&px=MTEyODc
– http://linux.slashdot.org/story/12/06/22/1233232/ubuntu-lays-plans-for-getting-past-uefi-secureboot

 

Windows phone 8 (winphone)

Right on the heels of Windows8 is WP8, the new Windows phone OS. It looks even nicer.
– http://www.techradar.com/news/phone-and-communications/mobile-phones/windows-phone-8-release-date-and-latest-details-1065086

 

Normalize.css – instead of resets (web)

To make a site look the same everywhere it is quite usual to make a reset class. To make a long story short it is not good for performance. Instead Normalize.css might do the trick.

– http://necolas.github.com/normalize.css/

 

Peity – draw graphics in jquery (web)

Presently version 0.6 but looks nice for simple (small) graphics like piecharts and histograms.
– http://benpickles.github.com/peity/

 

Mighty moose – a TDD continous test tool – now free (win)

Wouldn’t it be nice if test could be run automagically as you type?  I am aware of three such tools: nCrunch, one from Redgate and Mighty moose.  What differs the last from from the firsts is that the last is now Free.  The exact license is till to be presented.
The article contains the rational behind making it free.  The business models avaiable, why they don’t work for this product, and how being forced to make money stiffles innovation.
– http://codebetter.com/gregyoung/2012/06/23/mighty-moose-free/
– http://continuoustests.com/

 

Book: Pro application lifecycle management with Visual studio 2012 (win)

An old colleague of mine has released a book about ALM, TFS and Visualstudio.
– http://msmvps.com/blogs/molausson/archive/2012/07/17/book-project-pro-application-lifecycle-management-with-visual-studio-2012-completed.aspx

 

Introduction to Rx – a book (dotnet)

Rx, short for Reactive Extensions is a new coolness, just like Linq was before.
It is used for letting your objects send messages to each other.
Think of it this way:
If adding something to list X has a side effect of adding something to list Y;
With the usual solution one writes a method AddItemAndUpdateY and then crosses fingers that everyone uses this method instead of the built in myXList.Add method. Cooler developers overrides Add to do the same. The coolest ones have already started with Rx and lets the adding of something to ListX work its Rx magic and raise an event at ListY that it needs to be updated.
Just like one does in the GUI layer.
Below is linked a gratis book.
– http://introtorx.com/

 

Learn git hands on in a bunch of minutes

Below is linked a really nice interface with teaching/leading text, a terminal to write in and an folder view. If you’re new to Git – try it!
– http://try.github.com/levels/1/challenges/1

 

Nemerle – OO, FP, metaprogramming all bundled in dotnet (dotnet)

There is nothing new about Nemerle – whatever feature you point at can be continued with a “…as earlier done in language X” but with Nemerle everything is bundled and in the dotnet world.
Ordinary object oriented programming with functional programming mixed in. Then there is macro programming where one can extend the language itself, aspects and more than I care to write bout.
Nice overview for language geeks. People satisfied with their lives don’t need to bother.
– http://nemerle.org/About/

 

Security, privacy and rights

Some Facebook games no longer ask permission to access your profile information

Too give the user a “smooth experience” (my quotes) some Facebook applications can access your stuff without you saying yes. Isn’t this a bit rude, privacy-wise? you might ask. And it most certainly is.
Then also remember that if a friend of yours installs an application this application gets access to your data too.
– http://venturebeat.com/2012/07/14/some-facebook-games-no-longer-ask-permission-to-access-your-profile-information/
– http://www.selfelected.com/communicate-communicate-communicate-and-the-lack-of-privacy-in-facebook-applications/ <- When you share personal data with a friend on Facebook you also share it with the Facebook apps your friend uses. read that again.

 

Tracing on the web and DuckDuckGo (web)

Besides being tracked by the secret police by respective country you are also tracked by companies; companies that sometime believe they are above the law regarding tracing of email traffic contrary to the Human rights agreement that everyone has the right to private conversation.
Enough of political talk. Back to basics.
There are plenty of cookies in your web browser and more than a handful of them are used for tracking your movements on the web. Signing out of Facebook doesn’t save you – logged in or not doesn’t have to do with cookies. And even though signing out affects your cookies visibly, many advertisement companies have banded together for cross tracking your cookies. This means that you are tracked never the less. By companies. That won’t tell you.
Do install something like Do not track and you will get a live number of the number of tracks on every site you visit. Oh. It removes the cookies so you don’t get tracked too.
Then we have the search result adoption for good and bad. If you use Google for all your searching and you are signed in the result will narrow down. This is called Filter bubble. Either use another browser, a virgin one, for searching or Duckduckgo that proxies and anonymises all your searches. It also does a cleaning for sites that are only there for getting high Google ranks. Google is on a losing battle there as long as they are #1. As soon as Google updates their page rank algorithm so will sites. As a small player Duckduckgo can do a curation.
– http://www.duckduckgoog.com/browser <- make googling through Duckduckgo the standard; aye, it’s open source
– http://duckduckgo.com/

 

Clemency petition (nådeansökan) for Peter Sunde

Whether you like the doings of The pirate bay or not they did one thing: they lifted the abuse of power from the big media companies to the eyes of the public. The politicians have yet to understand.
Will PSunde succeed? Nope. Not in Sweden. As the 51st state of USA Sweden still want the ACTA agreement to pass. And that rhymes badly with letting the people decide.
– http://thenextweb.com/insider/2012/07/14/clemency-petition-for-the-pirate-bay-co-founder-peter-sunde-passes-20k-signatures/
– http://blog.brokep.com/2012/07/10/wow-update-on-all-the-support/ <- from the man himself.
– http://blog.brokep.com/2012/07/04/nadeansokan/ <- på svenska och upprörande. bra skrivet dessutom. men man blir ju inte presstalesman för att man är dålig på att skriva text.
– http://www.avaaz.org/en/petition/Grant_Peter_Sundes_of_The_Pirate_Bay_plea_for_pardon <- do a little yourself!

 

Miscellaneous

Lego makes Minecraft

When I first tried Minecraft I felt that it was like Lego.  And this in a much better way that Lego has managed to go digital themselves; their games are simple, albeit well balanced and funny for kids but don’t give you any “Lego feeling”.  Not even LCAD, a CAD with true Lego parts makes you feel like a Lego builder, the parts are all there but the tactile sensation is gone.
Recently Lego released a set where one can build a piece of a Minecraft world.
I suggest you try Minecraft.  If you are a grown up it probably won’t be fun for a long time, just like Lego isn’t as fun any more, but it is well worth trying.  I have tried it on Windows and on Ipad.
– http://aboutus.lego.com/en/news-room/2012/february/lego-minecraft-micro-world/
– http://kotaku.com/5878848/there-will-be-official-minecraft-lego-sets

 

How to not buy a used car

“The Sumo was the only car I’ve ever owned. From now on, if I ever buy a car again, it’s going to be a new car. A Subaru, of course. The Toyota GT86.”
– http://jalopnik.com/5923180/
Tipthanks FredrikH

 

Makies – configurable dolls

So so interesting until I found a lobotomised version with what was an Arduino sticking out.
– http://makie.me/
Tipthanks JohanS

 

Teaching your kid to code – why?

Should kids learn to program? Don’t they spend too much time in front of Facebook, Worldofwarcraft and Minecraft already? Maybe it’s not about programming as much as about computer literacy.
JGalloway presents his views on the subject through the link below. Maybe a bit to long article and scarce in hard data but raising a kid isn’t a one-book-for-all-the answers thing and a non-programming oriented post might be the right thing.
– http://weblogs.asp.net/jgalloway/archive/2012/05/16/why-i-taught-my-daughter-to-code-a-little.aspx

 

House on stilts

I am spoiling the link but: if you build a house you can build it on stilts.  Because you can.  But if you do you must incorporate a slide.  Because it takes it to a whole new level.

 

There are more cool houses linked at the bottom of the site.

 

– http://dornob.com/forest-fantasy-personal-sanctuary-among-the-treetops/

 

Album covers

One feature of LPs that beats CDs hands down is the image format.  And what images!

Unfortunately one’s eyes cannot forget the Stay hungry record.  And the bad cutout of Pros and cons of hitchhiking is still burning behind my iris.
But it can get worse.

I won’t say I have in my ownership Loffe Carlsson goes Latin America.  But that cover is humour!  And as an Abba-not-liker I certainly don’t have Super trouper with the the soldier to the left taking the focus away from Björn, you know the guy that juggles on the back side and one of the flares is frozen in time as a unicorn horn.  And the picture isn’t even sharp!

Finally I do have to give kudos to Freddie Gage with his title All my friend are dead.  If he hadn’t had white shoes and the world’s widest tie it would have been the coolest album title that decade.
But it can get worse.
Tipthanks Lasse

 

Laptop bag that transforms into a chair and a desk (design)

As the headline says. Cool idea.
– http://designtaxi.com/news/352933/Laptop-Bag-That-Transforms-Into-A-Chair-And-Desk/

 

Google maps/street view inside Pompei and in Antarctica

Where the googlemobile can’t go a three wheeled bicycle can. Like through the narrow streets of the Pompei ruins.
Did you know there is a special ambulance that has a wheel width adjusted to the elevated crossing stones in Pompei?
There are more sights than the two linked below.
– http://www.google.com/culturalinstitute/worldwonders/pompei/
– http://www.google.com/culturalinstitute/worldwonders/gammelstad/  <- luleå, sweden
– http://maps.google.com/intl/en/help/maps/streetview/gallery.html#!/antarctica

 

Run training app – with zombie love

There are thirteen to a dozen of apps for helping you run.  But only one has the sound of zombies and people in need.  The very idea is so good that I’m thinking giving up base jumping and taking up jogging instead.
– http://www.swedroid.se/zombies-run-slapps-for-android-spring-pa-riktigt-lyssna-pa-ljudaventyr-och-bli-jagad-av-zombies/

 

“That’s not stupid”

Fireworks gone wrong.

I was :-) and then :-0 and then LOL and then ROTFL. Then I watched again.
– http://www.youtube.com/watch?v=te2uWb_zkK8

 

Finally, a line of fan gear for people who hate sports

Finally, A Line Of Fan Gear For People Who Hate Sports

http://www.fastcodesign.com/1670181/finally-a-line-of-fan-gear-for-people-who-hate-sports

 

*EOF*

Knockout.js and custom attribute

July 28th, 2012

Say you doing MVVM binding with Knockout.  Say you want to create an attribute on a HTML element that isn’t proper HTML.

1
<a href="#" data-bind="attr: { 'userId' : id }" class="deleteLink">delete</a>

The trick is to set the attribute name as a string: ‘userId’.  This is proper JSON.  To be honest – it is the proper way to create JSON but since javascript solves it anyway we usually  omit it.

Now for the second part.  How do we get it again?

1
/element/.attributes["userId"].value

is the trick.
Like so:

1
2
3
4
$.(".deleteLink").live( "click", delete_Click );
function delete_Click(){
    alert( this.attributes["userId"].value );
}

Exception: Uncaught reference: Model is not defined – have you forgotten the ampersand?

July 22nd, 2012

In Aspnet MVC we use “Model” to send  data to the view/cshtml file.

Then we want to use this Model in Jquery.

One cannot simply write

$("#MyControl").text( Model.ID );

Instead write

$("#MyControl").text( "@Model.ID" );
I wouldn’t this either but instead send the data to a hidden control or something.  I can’t formalise why but the feeling is with me that I shouldn’t.
Read slightly more here and here.

Neo4j: org.neo4j.graphdb.NotFoundException: Target file[nioneo_logical.log.v1] already exists

July 18th, 2012

My Neo4j didn’t start and my log showed

1
org.neo4j.graphdb.NotFoundException: Target file[nioneo_logical.log.v1] already exists

I solved it by removing all nioneo_logical.log* files in data/graph.db/
Right or wrong I don’t know but my nodes and indices remained intact.

Neo4j and Neo4jClient dis and dat

July 11th, 2012

Below is various stuff I have found while working with Neo4j and Neo4jClient.  Helpful?  Dunno.  At least it is better to keep text searchable than living just in my head.  To be forgotten.  Like tears in rain.

Neo4jClient can be installed through Nuget.  Install-Package Neo4jClient.  Awesome.

How to do some calls is here: http://hg.readify.net/neo4jclient/src/4693da483a90/Test/ApiUsageIdeas.cs

Stackoverflow tag for Neo4jClient is here: http://stackoverflow.com/questions/tagged/neo4jclient

Info on creating index is found here:  http://romikoderbynew.com/2011/08/28/lucene-full-text-indexing-with-neo4j/

Creating a relation is a totally different horse than node.  Why? Here is dotnet code for said: http://blog.micic.ch/net/using-neo4j-graph-db-with-c-net

Finding all nodes, and deleting them if wished is found here: http://stackoverflow.com/questions/12903873/neo4j-get-all-nodes-in-a-graph-even-those-that-are-unconnected-by-relationship.
The queries are

1
2
START n=node(*)
RETURN n

and

1
2
3
START n=node(*)
MATCH n-[r?]-() where ID(n) &lt;&gt; 0
DELETE n, r;

(replace &lt;&gt; with <>

Looking at an index in the web client:

http://stackoverflow.com/questions/8518541/neo4j-querying-a-node-index-with-wildcards-via-the-webadmin-data-browser

For getting all nodes for an index with index name “MyIndexName” and property “MyProperty” write

1
node:index:MyIndexName:MyProperty:*

in the web admin.  It also works with an exact index.

Writing a Relation is not as easy as writing a node.  Se here: http://blog.micic.ch/net/using-neo4j-graph-db-with-c-net

I have not been able to confirm that it is possible to write properties on the relation.

Reading the relation again through its ID is also not as easy a reading a node.  A workaround is to use Gremlin: http://stackoverflow.com/questions/15086596/how-do-i-use-neo4jclient-to-get-a-neo4j-relation-by-its-id