Marius Gheorghe

On building software. And other stuff in between



The Red Queen's War minireview

05 September 2016

The followup (i guess it can be called that ) to Broken Empire . Different main character, different "quest" but the madness is still there. While i didn't enjoyed Red Queen's War as much as Broken Empire (different strokes for different folks i believe ) it is still a good and enjoyable (you can read it independently of the Broken Empire but you'll miss some jokes/callbacks) series.

Bring them on , Mark Lawrence.

 


Powershell help quick tips

03 June 2016

The first tip is about upgrading your powershell help files so it will be up to date. For this just run :
update-help
Second tip is about searching for useful cmdlets when trying to achieve something with powershell. For instance if you are interesting in looking at the event viewer entries (for instance), you can run :
get-help *event*
and get back all the cmdlets that let you interact with the event viewer.


More books minireviews

03 June 2016

The golem and the jinni


Very nice, very different from the "typical" fantasy novel. The genie in the past bits were the best, i'd gladly read a full novel with those parts.

 

The Night Angel trilogy


It's enjoyable. A much more "typical" fantasy series with good world building and character development.Most of it presented from a stealth assassin perspective. Towards the end , the narrative kind of stumbles a bit , but overall a enjoyable read.


More Drizzt books

16 March 2016

   

First 2 are the last books from the Companions Codex trilogy while the last if first book from new Homecoming trilogy.
First 2 books are fine, they reminded me of the old school Drizzt stories, even the cast of characters are very.....familiar. The last one is pretty bad though. The entire books is used as a setup for the cooler things to happen next.


The (inhouse) software development equation

16 March 2016

It's a simple equation with 3 variables : time (and implicit money),  set of features/bugs ratio  and code quality. For best results the trick is not to overemphasize one over the remaining 2 and just keep all 3 balanced. Sounds simple but sometimes it feels like the hardest thing in the world.

 


Non functional requirements

09 January 2016

Non functional requirements are just as important as functional ones. Yet not much thought is given to them (especially at the beginning when writing the specs for a new "system"). For instance everyone, obviously,  wants a secure application (also security is a bool, it's either secure or not, there are no intermediary steps) so a new application will not be released if it's insecure no matter how many functional requirements are implemented.

 The idea is to always keep in mind non functional requirements when designing a new "system". Some of the non functional requirements (like capacity/performance or security) can even have a direct impact over the functional requirements.


Dust and Shadow minireview

24 December 2015


This is basically Sherlock Holmes vs Jack the Ripper. It's one of those Sherlock Holmes novels which aren't written by Conan Doyle . Overall i'd say the book is decent but the identity of Jack the Ripper was a bit of a letdown for me.

Package manager for Powershell

08 December 2015
PSGet is a nifty Powershell package manager. Here's some of the packages i use :

- PowerLS : syntax highlight for ls output
- PoshGit : if you use git from CLI i'd say this is a must get
-Go : folder bookmarking for easier navigation.

The first law minireview

08 December 2015
first
"The first law" is a fantasy trilogy that goes off a bit from the beaten path. I enjoyed the writing style and the fact that some of the characters are not what you expect to find in a fantasy book (The Glokta character is especially "different"). The ending was a bit of a let down but overall it's a pretty solid "package". Recommended

After the main trilogy , there are 3 additional books that continue/reference some of the characters from the main story. I've only read the first 2:

Best served cold
best served cold cover
This is the book i enjoyed the most from all 5. It's a simple revenge story, dialed up to 11. Recommended.

The Heroes
the heroes cover
I actually really really disliked this one. I appreciate the idea of the book but i think the "execution" of that idea was downright
terrible. Not recommended



Firefox 64 bit version is out

04 November 2015

Finally the 64 bit version of Firefox is out. It works side by side with the 32 bit version (by default 64 bit version is installed in \Program Files instead of Program Files (x86)) but i really recommend everyone to just install the 64 bit version and ditch the 32 bit version (just make sure you back up your profile before doing this).



Overwrite default font in Firefox

28 October 2015
If you're using Firefox there's no need to use the crappy fonts "designers" use for their pages. Install your favorite font and set it as default :

Just uncheck "Allow pages to choose their own font" .

Quick tip to quickly find all FKs for a certain table

06 October 2015
You can find all FK for a certain table in SQL Server with the following query :

SELECT * FROM sys.foreign_keys WHERE referenced_object_id = object_id('YourTable')

Shopkeeper update

06 October 2015

There's a new Shopkeeper update (v2.6.2) . Grab it here

Change log :

- few small fixes

- added "Edit" button in product details page that redirects to the edit page in administration area. Button is available only if you are logged as administrator.


Use string interpolation in ASP.NET MVC 5

07 September 2015

One of the new C#6 features is string interpolation (which makes the code much nicer than using string.format()) . But by default the new Roslyn compiler is not used when compiling the MVC views. You can change this by installing the nuget package called  Microsoft.CodeDom.Providers.DotNetCompilerPlatform


It's just a binding failure

01 September 2015
A GitHub extension VS bug caused some serious damage for some dude. It was very sad to see the actual cause of the bug though. A frigging WPF checkbox binding failure case GitHub projects to always be created public.
It's funny because a lot of people who do XAML figured out that MVVM/binding is the wrong way to tackle UIs of a reasonable complexity but on the other hand it's still sad to see it fail so miserably.

Universal Windows apps - risking the quality of the apps

10 August 2015
I've played around for a bit with a Lumia device which run the latest Window 10 mobile. To be honest the entire switch to "Universal Windows apps" doesn't seem to great from a user perspective.

The main thing is that not matter how great the API is, it is HARD to make a app "work" from a 4 inch phone (using touch as input) to a Xbox One running on a 70' TV using a controller for input. Different device sizes and different input methods are usually handled differently so "hiding" all this under a API won't necessarily make the apps great.

Just look at Android, even after all these years you can still find apps which suck when are running on a tablet (they don't make proper use of the entire screen estate). Nevermind the fact the the OS still doesn't support basic features like running 2 apps side by side (never mind the Samsung hacks, that has his own share of problems).

To me, with the universal runtime , it seems Microsoft is risking to have more apps which are mediocre on multiple devices rather than fewer apps which run and work great on each device type. Windows Mobile /Windows 10 won't compete with Android / iOS regarding the number of apps anytime soon (if ever).

Is it worth risking the user experience for "many apps" ? Personally i don't think so.

Run Edge browser from command line / keyboard shortcut

30 July 2015
I run all of my apps from keyboard shortcuts with AutoHotkey (great utility, i highly recommended), so i wanted to do the same thing with Edge.
But with Edge it's a bit tricky because it's a "modern/univeral app" and those types of apps require a certain unique server parameter when you invoke them, directly from command line.
But i've figured out that Edge registers it's own shell extension and we can use that to launch it. So directly it can be done like this :
powershell.exe "start microsoft-edge:http://google.com"

Obviously feel free to either replace or delete the http://google.com part.

Immutable collections in .NET

30 July 2015
Dealing with immutable collections in .NET  is very easy with the help of the ImmutableCollections package on nuget .

Here's a example :

ImmutableList initial = ImmutableList.Empty;
ImmutableList immutableList = initial.Add("stuff");


Any operation on the collection will create a duplicate collection (so in the above example the "initial" collection is still empty).
Another much simple way would to be use the IReadCollection from .NET 4.5
List initial = Enumerable.Range(1, 10).ToList();
ReadOnlyCollection readOnlyCollection = initial.AsReadOnly();

Now you can pass readOnlyCollection and obviously the initial collection will remain unchanged.

Global dark stylesheet for browser

16 July 2015
I'm a big fan of reading white text on black background. So i've made a global custom stylesheet for this purpose (usable in most browsers with the Stylish extension installed).

Few thoughts on Jade templating language

15 July 2015
I've started using Jade on a pet project a few weeks ago. It's a nice library that saves you a few keystrokes while writing HTML but, sadly, it still has 2 things i really dislike :

- it's too different from "regular" HTML to be picked up by beginners and thus creates a barrier to entry. Also the "size" savings are not that impressive compared with "regular" HTML.

- it allows embedding a subset of JS directly inside of markup which can easily become a pain in the ass to debug. Breaking separation of concerns is a big no no from my POV.

Sword of Destiny minireview

15 July 2015
 sword of destiny

Ah, The Witcher series. "Sword of Destiny" is actually a standalone list of short stories (just like "The Last Wish"). Overall the stories and not that good compared with "The Last Wish" but there's a nice story there about Geralt meeting Ciri for the first time.

Recommended only if you read the Witcher saga, otherwise there's no point in reading it standalone.

New site for Shopkeeper

13 July 2015

Shopkeeper has a new site now. It's still far from containing all the stuff i want there but it's a start.


The build script

30 June 2015

Ah, the build + optional deploy script. The "thing" that turns whatever your compiler spits out into a zip/msi/whatever that you can actually install /pass along to customers. For build scripts i've started with batch files, C# , Powershell, moving to msbuild tasks (yeah, that was "fun" ), FAKE, to the node.js "task runner" framework du jour (Grunt, Gulp etc)  to finally get back to Powershell. 

  I still think the best solution for writing a build script is in a shell scripting language (Powershell, bash, whatever) because :

- when it will crash (and it will !!) you're debugging code written by you instead of fuzzing around with a stacktrace spitted up by some shitty Grunt plugin (for instance).

- ubiquity : only powershell/bash is required to run it (compared with node.js + npm + gulp + whatever other plugins you are using).

- simplest way to run 3rd party CLI apps as part of build process ( "& filePath args" and you're done).

- everything is in one place (no package.json, gruntfile(s) and so on). A single file that handles everything.



Curse of the necrarch minireview

04 June 2015

Names are all wrong in the Warhammer fantasy universe. I mean, who calls a badass vampire "Radu" ? Seriously, it's a vampire not a baker.
Anyway, the premise in "Curse of the necrarch " is very straightforward : big fight between humans and undead. That's basically it. There is some "background" plot to this but it's not really that interesting (or sufficiently developed). Overall i'd say the books is kind of meh.



Shopkeeper localization

26 May 2015

Working on Shopkeeper localization. Lots of commits with same message.....




Blackhearts minireview

25 May 2015
blackhearts


This is the first book i've read in the Warhammer fantasy setting. It's actually a collection of 3 stories "tied" together with 2 short ones. It's the story of a ragtag group of human soldiers who do different "jobs" for the Empire in exchange for their freedom. Overall the quality is okeish, nothing bad but nothing great either.



All http traffic should be encrypted

01 April 2015
There was a interesting piece of news in the last few days. Basically China launched a DDOS attack on GitHub by rewriting the Baidu analytics code to point to a certain GitHub hosted project. Thus, all the sites (and their users) who run Baidu analytics code were contributing in DDOSing GitHub. Its another proof in a long list of issues that basically proves that the web would actually be better if all traffic would be encrypted by default. Not necessary reliant on Certificate Authorities for verification, just encrypted.

And it's also in sheer contrast with the sad state of affairs today regarding encryption when using self signed certificates. The browsers treat plain HTTP traffic (that your ISP can rewrite to include ads, look it up it happened) as "better" than traffic encrypted with a self signed certificate. That's why the Let's Encrypt initiative is so important.

Powder mage trilogy minireview

25 March 2015
     
So i've found about these books while procrastinating on r/fantasy on reddit. The premise looked interesting (flintlock fantasy FTW) so i gave the books a shot. And boooom. These are the best books i've read in last few years. Interesting set of characters, great world building and magic system on top a gripping story. But the thing that was most impressive to me was the pacing. This trilogy has expert pacing. Really, once the story has its hooks into you, it's really hard to let go :)

I highly recommend these books to anyone. Also if you read them, they are a few published short stories set in the same universe as the "main books". I've read all of them , they are pretty good but i highly recommend reading at least "Fornsworn" and "Servant of the crown".

Dune / Dune Messiah minireview

25 March 2015
dune    dune messiah

Just reading the classics. Although scifi is not my favorite genre, it makes sense to read what is apparently ranked as the world's best-selling science fiction novel. Overall i enjoyed the first book. I wouldn't go as far as say it's a "great book" , but it's enjoyable. I enjoyed the characters, world building and the environment/ecology part of the story (apparently Dune is the first book which deals with the environment/ecology subject). The story both drags in some parts and rushes in the other (especially in the second half) but it's not that bad.

Dune Messiah, on the other hand, it's a completely different kind of book. I understood why the book is written like that (the whole book basically "deals" with the psychological state of the main character after the events of the first book) but , in the end, the book is very different from the first one. It (mostly) lacks "action" and the tone is very different from the first one (not in a good way).


Overall, i'd say the first 2 books are not good enough to make me want to read the rest of them.

Backup up GDrive to Dropbox

16 January 2015

So i've found out that Dropbox and OneDrive actually support junction points . That basically means you can backup your GDrive and OneDrive folder to Dropbox (for instance) .

To make this work you only need to create a NTFS junction point. For instance if you want to backup GDrive to Dropbox :

mklink /j "c:\dropbox\gdrive" "c:\users\blah\google drive"

Obviously fix the paths from the example. This will create the junction point "gdrive" in the dropbox folder which will point to the original GDrive folder and Dropbox will happily sync the content of the GDrive folder.

Neat, huh ?

"Eaters of the dead" minireview

13 January 2015


This book has been "hollywoodized" under the name The 13th warrior . I like Crichton's writing and i was just curios to see how "accurate" the movie was. Overall it's pretty close and the book is written basically "to the point". Really enjoyed reading it.

Indiana Jones novels minireviews

13 January 2015


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

10 December 2014
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.

Announcing Yaxero, a tech news site

22 September 2014
A few days ago i've launched Yaxero a new tech/gaming/programming news site. Come a get your daily news from Yaxero

Real world sample of why sanity testing is important

28 August 2014
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

20 August 2014
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

20 August 2014


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

01 August 2014
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

14 July 2014
    

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.


Maybe it's time to ditch HTML and CSS

20 June 2014
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)

19 June 2014

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

02 June 2014
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

02 June 2014
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

18 May 2014
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.

Mozilla and DRM

16 May 2014
Big debacle over Mozilla's decision to support DRM. FSF is not wasting any time of condemning Mozilla's decision.

 The thing is ....it's not that simple. Mozilla main source of revenue comes from Google. Google pays quite a lot of money to have Google search as the default search engine on Firefox. And they do this because Firefox has a nice marketshare. Mozilla "livehood" depends on this. If they choose NOT to implement EME ( Encrypted Media Extensions ) , their marketshare will fall down (people will ditch FF because Hulu/Netflix and any other movie streaming provider won't work on a browser without EME support) , and Google will stop paying them because Firefox marketshare will become (almost) irrelevant.

 So, the way i see it, Mozilla's decision to support EME is more of matter of survival for them rather than politics.

The making of Karateka and Prince of Persia

16 May 2014

Been wanting to read these for a while. Jordan Mechner notes about creating Karateka and Prince of Persian. Lighthearted, interesting read about a kid trying to break into the game industry ~30 years ago. Things were so different back then. 


Favourite quote is " I dreamed about being chased by a subroutine".


Neverwinter saga minireview

15 April 2014

    More Drizzt , yay !! The good news is that the first book, Gauntlgrym, is pretty enjoyable and hearkens a bit to the old books. The bad news is that the next 3 just aren't that great. They aren't bad but they aren't good either. My main criticism is that is just not enough interesting content in there. Too much filler (and, i think, RA Salvatore releasing a new book each year doesn't help with this). Anyway....personally i wouldn't mind waiting 2-3 years for a good book with Drizzt.

So what are you ?

07 April 2014

I ask this question pretty often to my fellow colleague developers. I'm actually very interesting to see how exactly they perceive the work they do. Most of the time i get back the boring (and untrue) "engineer". Most of the people "doing software" seem to think they are engineers. This can't really be further from the true (if you don't believe me, you should speak with a "regular" engineer from other areas and compare your work with his/her).

Another category of people think of themselves in more abstract terms : poets (because writing code is exactly like writing poetry, right ?) or even philosophers. Obviously, this is bullshit....

Other people think of themselves as craftsmen (personally i think this is a lot closer to the truth). At the end of the day, personally, i think building software is a lot like regular craftsmanship.We use tools just like other craftsmen (instead nails and hammers we use IDEs and debuggers) to "craft" something. The result of our work is , hopefully, something that other people enjoy to use.

What i don't understand is why do people get upset when i told them there isn't much of a difference between what they do and people who build chairs...


REST services and documentation

27 March 2014
In theory REST is the pinnacle of simplicity. Just a HTTP request (GET or POST) along with the data and that's it. In practice things get a little bit more complicated. The biggest problem i noticed with REST services (apart from having crap documentation most of the time) is that some people writing services expect the passed parameters in certain place but they usually fail to document this. Basically you can pass datato the service "stored" in 3 locations :

  1. as parameters in query string
  2. as custom http headers
  3. in body (either url encoded or a json object for more complex stuff)

Like i said sometime people expect a certain parameter in a certain place but forget to document this. When writing services you'll make the life simpler for all people consuming the services if you check in all 3 places. Overall it just makes things simple.

Another interesting thing i noticed is that , instead of actually writing some docs about how to consume the service, some companies started to offer libraries for this. A few days ago i was looking to do a integration with a SMS provider and frustrated about their docs i've decided to look at their library. Lo and behold it was a 9 (!!!) Mb assembly !!? Curiosity got the best of me and i cracked it open with dotPeek to see what's inside . The service code were fairly small but it had 2 (!!) 3rd party "REST frameworks" bundled up along with their code. Why the heck you i use a bloated library like this ? Just because they can't properly document a web service with 5 frigging parameters ?

Usually people bitch about SOAP (when compared with REST anyway...) but the Microsoft tooling for SOAP was unmatched. Just paste a url in VisualStudio and 30 seconds later you wrote code against that web service without needing to actually look at any kind of documentation. It just worked.

On CSS media queries...

20 March 2014
Media queries are a nice (and long overdue i might add) addition to CSS. They allow you to write CSS based on a few simple criteria (there are more but these 2 are the most important) :
- the device orientation (portrait or landscape);
- the device width and height.

The problem is that usually you want to write your CSS a bit more "high level". Writing styles for the device width/height is no good.....usually you want to have different layouts based on the type of device : phone, tablet and desktop. And unfortunately even if you know the type of device your code runs on (by chopping the user agent ) there is no way to write a media query based on that information. Would be really nice to be able to write something like :

@media screen phone
{
}

@media screen tablet
{
}

Maybe we can write code like this in CSS4. But i won't hold my breath.....

Equivalent of tmux for Windows

25 February 2014
One of nicest way to improve the terminal in Linux is tmux. It allows you to run multiple apps inside the same terminal window.
Fortunately, for Windows, ConEmu allows you to do basically the same thing and it even allows you to run GUI apps inside the terminal .

Here is how it looks in action (here i'm running SublimeText inside the terminal window) :



I'm Marius Gheorghe, a software craftsman. This is my personal blog, opinions are entirely mine, blah blah.






Contact me :
Mail : gmarius@gmail.com

Twitter : @mariusgheorghe

LinkedIn