.Net Core on a Mac

It’s been ages since I blogged anything. More, anything technical. Since I am in the process of experimenting with ASP .NET Core on my Mac, I thought to take the opportunity and log this journey here.

So far I have done three things:

This isn’t as straightforward as just installing Visual Studio Code. To have scaffolding one  needs to rely on CLI tools, and to do some client side development on the usual suspects: bower, jQuery, bootstrap etc. Which means you need to spend a lot of time  with the Terminal.

  • Set up a development database

While one can experiment with SQLite or MySQL, I wanted the real Microsoft thing, SQL Server, and since this isn’t available for Mac I used Virtual Box with a Windows 10 LTSB guest, where I installed SQL Server Express.

To connect to the database from the host, the VirtualBox has to be on bridged networking and SQL Server should be accepting TCP connections.

  • Found a relatively simple project that entails the most common workflows.

Our company’s website  is multilingual and it is WordPress based (no wonder). While the blog  parts serve their purpose nicely, the pages are bloated (HTML-wise) and have a lot of javascript code running (for a reason) which could benefit from a slimming diet.

So, I thought, why not try to migrate the WordPress pages (not the posts) to an MVC site based on Asp .Net Core. To make things more interesting, I want to add some dynamic content too, pulled from our app’s database (why should I be bothering with SQL Server if I didn’t?).

And here I am. So far, I have made some progress which I will relate in subsequent posts. This post is only an introduction to the theme. If you have interest in such experiments, stay tuned.

Why people stick to their views despite evidence to the contrary?

Why people stick to their views despite evidence to the contrary?

More, why do they stick to their views fanatically especially when there is evidence to the contrary?

From the little I have read on the subject, the explanation seems to lie in our perception of “self”. Our views are an essential part of what we perceive as our “self” and an attack on the views is considered as an attack on the “self”. Therefore, we counterattack.

To reinforce the sense of “self” we stick to like minded people, read and watch only what confirms our prejudices and revel on the trashing of the “opponents”.

This must be a “bug” of our mental apparatus. Because, in the course of time, we change views anyway. Only never when we are told so. So we change “self” and disprove the importance of having this specific view or the other.

But in the short term we consider our views as “eternal” because this serves well the “selfishness” of this plastic thing called “ the self”. Maybe this is what led Buddha to proclaim that the “self” is an illusion.

How do we fix this “bug”? This is an open question. My personal experience leads me to believe that it happens more easily in non-confrontational situations. More likely when you are reading a book, or watching a documentary, than when you are discussing with another person.

Which shifts the problem to “how one picks the right book/documentary/experience etc” that would help him to fix his views?

In essence, we never “pick”. Like the social media maxim goes, the “news” find us. And it is precisely into this modern space, the social media space, that it gets easier to pick up new views provided that they just “flow” around you and not directed at you. At least, I think so.

The productivity of illness

There Is A Light That Never Goes Out
It has happened to me a few times but it wash’t until today, the third day of being confined at home because of my flu, that I began to see the pattern.

Being sick is a great chance to think! 

“Oh, man, this is … sick”, you might say. Maybe, but it is true nevertheless. And there is a very good reason for this: you don’t have many alternatives.

What I mean is that if you are really sick, you probably are in bed, cannot do a lot of work, cannot see or talk to many people, watch tv, read books or surf the net. If you are really sick. Or you can do all of the above but for a limited amount of time. And the rest of the day you lie on your bed suffering and waiting.

But there is an organ  that is not too much affected by the condition of the rest of the body: the brain.

Yes, you might be sleepy or feel that your thought is misty, yet, in the absence of external preoccupations, and with plenty of idle time,  all your latent thoughts, worries, forgotten tasks, fears, hopes and desires will find a way to sneak into your consciousness. And here lies your moment of opportunity: you can play it like tv, i.e. watch and forget, or you can try to make some sense out of this mental jumble, discover things, short out other and finally, find inspiration and motivation to change your way onwards.

And this is precisely the pattern I realised today: it has happened to me each time I was in bed for more than one day. And each time I got away with something good. Not always significant or lasting, but, at least temporarily, beneficial.

As a matter of fact, this is how I came up with the Discoveroom idea. It was two years ago when I was in bed for about a month because of my waist. As a matter of fact, lots of ideas came to me then. I even had  a moleskine by me to note them down quickly. I also started learning ruby and embarked in a pet project utilising codeigniter. But the one thing that got stuck was Discoveroom (not by this name, or any name, in the beginning) and now that I am again in bed, this is the one I find myself deliberating about.

So, what’s the moral here? Get ill to get things done? Of course not. The moral is that there is no idle time. Only idle people. You choose what you are.



Mac et al. annoyances

The last few days I am under a spell of bad luck: a near the elbow left-arm fracture, an old spine hernia that came back with a vengeance, confining me to bed the past two days, and, today, a Macbook Air that refuses make a  sound  while it won’t let me end a dialog.

Since the health of the body is less important than the health of the mind Mac, I will skip the first and focus on the second 🙂

I have a 4,5 year Mac book Air (first generation), with an 80Gb disk. I have managed to keep upgrading up to Snow Leopard and then stopped. I have decided that my next upgrade will be a new Mac book, not a new OSX for the current one.

In the short (or long, depending on the perspective) life of this machine I have experienced two serious problems, both taken care by Apple Support.

Before turning to apple support for this one too, I want to describe it here, hoping that someone might stumble on it and offer a solution that I haven’t already found (i.e.  tried, and rejected) googling for an answer.


The sound problem looks like  a hardware one. At least, this was my first impression since input and output devices ceased to show up in the Sound Settings in System Preferences.

The first search though, revealed that this is an all too common Mac problem, highly correlated to Air’s and Lions. So with an Air and no Lion I have a  50% chance of a software problem.

The known remedies to the missing sound problem, nicely summed up here, offered me no consolance. Neither the PRAM trick. So, I am afraid that it really is a hardware problem.



The program I use most frequently (next to Chrome) is Coda, since I am doing most of my professional and personal work with it. But today it let me down too, although I don’t think it is strictly a Coda issue, as I noticed the same behavior with a couple of other programs too, namely Mail and SourceTree, but since I do not use them often I did not pay attention.

So what is this problem? Every time I attempt to open Coda I get stuck with the dialog below. I cannot close it, press a button, or make it progress. It stays there eternally.


What the dialog says is true. I indeed got stuck saving a remote file, that forced to quit coda,  and since then…

My thought was that if I cleaned the local copies the dialog would disappear.

I tried to clear the cache but had problem finding it.

I deleted the Cache.db file in ~/Library/Caches/com.panic.Coda and all the entries in ~/Library/Coda/ (which look unrelated, but did it nevertheless). Then I looked at ~/Library/Application Support/Coda/Logs but the folder was empty.

In short, I did not find the cached remote files.

As a last resort, I also attempted to reinstall Coda. I got exactly the same result.

The funny thing is that if I click on a document that normally opens with Coda, the document opens nicely but then the accursed dialog kicks in.

So here I stand, or, rather, I lie, with no other solution left only than to beg you, kind reader, for one, before I make apple support richer.

Update 1: 

I managed to get rid of the annoying dialog by cleaning some cache files in /Library/Caches.  More specifically, after cleaning blindly all the cache files and folders that had a date close to yesterday, I opened Coda, saw the dialog again but this time clicking on cancel actually worked. Then, it asked me for a key, as I had reinstalled it and after putting the original purchase key, the confirmation dialog got stuck again. This time I knew where to look and it appeared that the only newly created cache file was /Library/Caches/com.apple.DiagnosticReporting.Networks.plist. I deleted it again, reopened Coda, repeated the above steps but this time, after entering the license key, the confirmation dialog worked. Of course all my setting were gone with the cache cleaning and reinstallation which is already a loss. But, at least I have Coda working.

Now, the property list file mentioned above, did not appear to have anything special inside. As a matter of fact, the one I initially deleted and the new one generated were identical. So, I cannot tell why it helped.

Update 2:

It took me sometime to make the connection: the two issues are related. In a very simple and stupid way: the dialogs get stuck as they attempt to play a sound. And since the sound system is dead, the dialog hangs up waiting. So, what I did, was disable the interface sound effects and, voila, dialogs started behaving.

Update 3 (7/12/2012)
Sigh! I was wrong. The dialogs problem is still there. And not only in Coda…


Big leap in bio-engineering: scientists simulate an entire organism in software for the first time ever

Can we put this in a loop? We would simulate eternal life this way 🙂

Some points towards the end of the article seem to justify my skepticism about QR codes: they are a fun way to open a link but why would you want to open it in the first place?