Marius Gheorghe

Building software : make it work, make it good, make it fast

Indiana Jones novels minireviews


I was surprised to find out there are some Indiana Jones novels out there (which have nothing to do with the movies by the way). Since i like the Indiana Jones character i've read them and here's a few words about each one of them :

Peril at Delphi : okeish because we find how IJ becomes a archeologist.
Dance of the giants : Okeish
Seven Veils : Okeish
Genesis Deluge : Probably the best book and very Indiana Joneish.
Unicorns Legacy : so so.
Interior world : pretty bad actually. Kind of reminded me of the Pellucidar serie except is worse.
Sky Pirates : by far the worst book. The author should also do more research (hint : Henri Coanda was Romanian).



NET Core : 1 step forward, 2 steps back

There's are some interesting developemnts in the .NET land lately. Microsoft announced .NET Core , a Micrososft supported cross platform initiative to run .NET on Linux and OSX. The immediate result is that ASP.NET vNext will run on Linux (although not integrated with Apache or any other webserver, with OWIN we'll be albe to run in our own custom process). Obviosly this is good news but it's one of those 1 step forward, 2 steps back situations.

Good things :
- deploy ASP.NET on Linux (it's not like somebody cares about OSX server).
- with a official, high performance supported runtime (which Mono isn't), this might "open the gates" in the future for a QT port and we could write cross platform desktop apps.

Bad things :
- .NET Core is actually a (small) subset of the full .NET Framework. Most likely the full functionality will be somehow similar with Silverlight runtime. Anyone who did SL development and wanted to "port" code from full .NET to SLL knows how painful is that because of the missing things.
- EntityFramework 7 (which will launch along with ASP.NET vNext) will not be feature complete.
- right know is not exactly clear what exactly will be shipped as .NET Core so people can't start porting their commercial libraries to .NET Core.
- no AppDomains. Overall that is pretty bad but since you'll be running a single app per process, is not that bad.

Make no mistake though, having .NET runtime on Linux/OSC supported by Microsoft is pretty huge.

Real world sample of why sanity testing is important

Here's a very interesting real world sample of why simple sanity tests before a release are important. Metro 2033 Redux and Metro Last Light Redux have just been released with a giant bug (both games crash right at startup). Apparently they only crash on CPUs who do not support SSE 4.1 (most likely the "bug" is because they compiled with very aggressive optimizations and a  +SSE4.1 instruction is generated).

Obviously they would have found this big problem just by running the game on multiple machines with different configurations.

Typescript and static typing

My favorite thing about Typescript is , without a doubt, static typing. No more dynamic bullshit, now you can actually have strong typing for DOM interaction (for instance) :

var upload: HTMLInputElement = document.getElementById("fileUpload");

And obviously the spiffy intellisense :

Jurrasic Park and The Lost World minireview



I was pretty surprised when i realized that the movie events only cover roughly 50% of the book story (there are a lot more stuff going one there). And the book is very nicely written, in a concise gripping manner. The second book, Lost World (just like the movie) is not as good as the first but it's still a entertaining read.

Recommended : true.

Goblin Corps minireview

goblin corps

The Darksiders book was ok so i thought it would be a good idea to read something else written by Ari Marmell. Sadly Goblin Corps isn't that good. It's the story of a team of "bad guys" (orc, troll, kobold, ogre etc) who do "stuff" and then move on to the next. The "meta" story is just cliche fantasy. At least the crude humor (and sometimes it is really crude) breaks the monotony.

Can't really recommend.

"The Broken Empire" minireview

    

This is such a pleasant surprise. A terrific fantasy trilogy with a "anti hero type" main character. Dark, violent and visceral this is basically the exact opposite of common "high fantasy" novels. The storytelling is succinct and to the point, just right not to get in the way of the action. A great story of revenge and redemption with a touch of madness thrown in.


Wholeheartedly recommended and personally i'm really looking forward to what Mark Lawrence is writing next.

Welcome to BlogEngine.NET 3.1

If you see this post it means that BlogEngine.NET is running and the hard part of creating your own blog is done. There is only a few things left to do.

Write Permissions

To be able to log in, write posts and customize blog, you need to enable write permissions on the App_Data and Custom folders. If your blog is hosted at a hosting provider, you can either log into your account’s admin page or call the support.

If you wish to use a database to store your blog data, we still encourage you to enable this write access for an images you may wish to store for your blog posts.  If you are interested in using Microsoft SQL Server, MySQL, SQL CE, or other databases, please see the BlogEngine docs to get started.

Security

When you've got write permissions set, you need to change the username and password. Find the sign-in link located either at the bottom or top of the page depending on your current theme and click it. Now enter "admin" in both the username and password fields and click the button. You will now see an admin menu appear. It has a link to the "Users" admin page. From there you can change password, create new users and set roles and permissions. Passwords are hashed by default so you better configure email in settings for password recovery to work or learn how to do it manually.

Configuration and Profile

Now that you have your blog secured, take a look through the settings and give your new blog a title.  BlogEngine.NET is set up to take full advantage of many semantic formats and technologies such as FOAF, SIOC and APML. It means that the content stored in your BlogEngine.NET installation will be fully portable and auto-discoverable.  Be sure to fill in your author profile to take better advantage of this.

Themes, Widgets & Extensions

One last thing to consider is customizing the look and behavior of your blog. We have themes, widgets and extensions available right out of the box. You can install more right from admin panel under Custom/Gallery.

On the web

You can find news about BlogEngine.NET on the official website. For tutorials, documentation, tips and tricks visit our docs site. The ongoing development of BlogEngine.NET can be followed at CodePlex where the daily builds will be published for anyone to download.

Good luck and happy writing.

The BlogEngine.NET team

Maybe it's time to ditch HTML and CSS

So Google just released Web Starter Kit , a "toolkit" for "Boilerplate & Tooling for Multi-Device Development".

Bullshit. Development of proper, complex apps for multiple devices is fucking grueling and no "toolkit" will save us. "Responsive design" is a idiotic term which is paraded a lot these days. The sad reality is that "responsive" design only "works" on simple , "static" , "read only" sites. It doesn't work on complex apps (with multiple form elements and somehow omplex UIs). Doing a "proper" web app with a certain level of complexity to work on multiple devices and form sizes IS hard work. There are still chunks of a browser behavior very important on mobile that are not standardized ( like zooming for instance). See how easy is to make a single HTML element not zoomable on mobile. Use kendo, jqueryUi, jqueryMobile, whatever ...is still a LOT of work just to get some basic layout behavior work. Something take is very simple to do with the "native" UI toolkits.

From my point of view a part of the problem is HTML and CSS (especially CSS) standards. The specs have become just too convulted and W3C just tries to cover EVERY single scenario now. Especially CSS is a clusterfuck of a complex specification , look at display for instance. And the irony a basic thing like centering a piece of text in a container is still hard too do with CSS. There are 3 million search results on Google on how to do that . This is the most basic operation that a layout engine should do and is still hard to get right.

From my point of view the "answer" would be a new standard with a much narrow . Something simple which describes a layout engine that should just works and which has the "responsive" stuff baked from the start. Maybe built on top of WebGL. Something that can actually take on mobile native toolkit. But yeah...i wouldn't hold my breath for this. After all W3C is still chasing jQuery level developrs with new APIs.

And Google....you're not moving the web forward with a half  assed Bootstrap clone.


Few tips and tricks for using Powershell as a shell language (part I)

Navigating around the filesystem

The first thing you have to do is add some "shortcuts" to your usual paths. The simplest way to do that is to edit the PS profile file (you can find this file in [[MyDocuments]]\WindowsPowerShell\Microsoft.PowerShell_profile). The "shortcuts" can be added in 2 ways (with advantages and disadvantages) :

- add the shortcut as a variable which points to the right path.

$dx = 'c:\dropbox'

To use it just cd %dx and you'll navigate to c:\dropbox. The advantage of using vars is that you can reuse them if you write some code interactively. The disadvantage is that you'll always have to "cd" manually to actually navigate to that path.

- if you don't really care about "reusing" that variable, you should do declare it like as a function:

function %dx
{
   cd c:\dropbox
}

To use it just type %dx and you'll navigate to that path. Also i really recommend you to use a standard naming convention for this (i prefix the "shortcuts" with the % char).
For navigation around the filesystem, "ls" is used to list the files/subfolders in the current path. Obviously you can also filter the result like this :

ls *.pdf

This will list just the pdf files from current path.

File operations

With PS , you can use the old DOS commands (like mkdir, del etc), the PS "native" commands or even the Linux utilities ( try GOW the lightweight Linux alternative ). Personally i prefer the old DOS commands, but the important thing to note here is you have the freedom to use 3rd party utilities instead of the builtin cmdlets if they do a better job. You can even add functions to your PS profile that invoke other utilities with built in cli parameters to save you some typing.

So here's how i do most filesystem operations:

- delete
The DOS command is del myfile.txt to delete a single file. It also works with wildcard selector del my*.jpg code>
The PS "native" way is using the Remove-Item cmdlet. Something like Remove-Item myfile.txt. But, obviously, you don't want to type "Remove-Item" each time so you can use the alias "rm".
If you prefer the "unix" way, just run the GOW rm utility: rm myfile.txt

- create folders / files
mkdir myFolder to use DOS/Linux command or New-Item MyFolder to use the builtin cmdlet. For files you usually want to edit it after creation. Personally i just run vim to create and edit the file using a function defined in my profile. Something like vimedit a.txt where vimedit will just run vim with the specified path as a parameter

- copy/move files
Copying and moving files from the command line is not the most straightforward thing ever but it's manageable. Usually i use copy/xcopy (built in Windows tools) or robocopy . Personally, i never really remember all the cli switches to do more advanced copy/move operations so i usually rely on FarManager (since it can be runned inside the terminal)

- grepping for text inside files For finding specific text pattern inside multiple files i'm using a Select-String wrapper like :

function psgrep($path, $fileType, $string)
{
   get-childitem $path -include $fileType -rec | select-string $string
}

Use it like
psgrep c:\oss\ *.cs "static" . This will search for the keyword "static" in filetypes *.cs from path c:\oss

- searching for files by name :
I use a Get-ChildItem wrapper like this
function psgrepFile($path, $fileType)
{
  get-childitem $path -include $fileType -rec
}
Invoke it like this :
psgrepFile c:\oss a*.xml

The companions and Night of the Hunter minireview

companions night hunter

"The Companions" is basically the first book of a new serie called "The Sundering". But it's also "fits" in the timeline of the Drizzt saga. Personally i didn't really liked the book. I think is basically superfluous. All the events described in this book could have been a chapter in the next "proper" book. It's kind of hard to describe exactly why i didn't like it this without spoiling the storyline so...i won't try.

"Night of the Hunter" is the first book in a new serie called "The Companion Codex". Overall i would say the book is okeish. From my point of view Salvatore is retreading too much but if you don't mind that, the book should be a enjoyable read. As least the good ol' drow scheming is back in action :)

PocketBook Basic 2 minireview

pocketbook

So i got a new ebook reader a few days ago. Since the Kindle doesn't do epubs and i don't need backlight and touch, eventually i've decided on a PocketBook Basic 2.

Hardware:

Plastic but nice. I like that it's very very light (specs says 188gr). The backside will get smeared with fingerprints but it's not a big deal. The only downside i find with the hardware is that the next/back buttons don't seem to always register.

Software:


Overall i would say the software is okeish, but it has some problems/missing features. As far as i can tell there are 2 reader apps in there : FBReader and AdobeViewer. My problem is that you can't choose what app to use for what format. So, for instance, i can't choose to read epubs with FBReader, AdobeViewer will be used by default (i'm guessing this is because it also supports epubs with DRM and only AdobeViewer can handle those).
Also it does have a annoying bug. You can set general settings like font name, width, size etc but AdobeViewer doesn't use those. So as a result for every book you have to set again the font, size etc. Needless to say this gets annoying very fast.
For missing features, a library search feature would be nice.

Conclusion:

Overall i would recommend this. It's cheap and gets the job done very good.

Lightweight tools and workflow with SqlServer

SqlServer database server and associated tools become more and more heavy and cumbersome with each new version. It's a bit ridiculous to install 2GB of stuff just so you can develop something on your local machine. Fortunately, there are lightweight alternatives. Here's what i have ended up using for this scenario:

- Install SqlServer 2014 LocalDb. It's available here (linked directly the x64 version). This is the SqlServer version created especially for this scenario.

- after installing it, you can connect directly to this server using sqllocaldb.exe (located in C:\Program Files\Microsoft SQL Server\120\Tools\Binn). The notable CLI switches are : -start and -stop (to start/stop the default server) . The entire list of cli switches is available at here.

- create your database using the default server instance (recommended). By default the database files are stucked in your UserProfile folder but you can override this to put the db file wherever you want:
 create database foo on (name='foo', filename='c:\DBs\foo.mdf')

- if you need a lightweight GUI alternative to Management Studio i recommand Query Plus Ex . You can connect to the default LocalDb server using the server name (localdb)\MSSQLLocalDB

- if you prefer CLI to the GUI tool, you can use sqlcmd.exe (which sadly is missing from the LocalDB install). You'll have to install SqlServer Express edition to get sqlcmd.exe

- update your app connection string to point to the new server and off you go.