HNHacker News
TopNewBestAskShowJobs

mhomde

1,054 karma · joined September 20, 2012

I live in Stockholm. I Like palt, snow and a good mojito :)
submissionscomments
mhomde··on C# 6.0: An Introduction
Async methods are mainly used in .Net apps that use an UI-thread paradigm since you avoid blocking the UI thread for things like IO calls
mhomde··on Why debugging is all about understanding
great points, thanks!
mhomde··on Reddit: A Nine-Year Case Study in Absentee Management
Community dynamics is incredibly hard, managing it under growth and after a certain threshold even more so, and radical change is almost impossible.

It's easy to say that someone has been too lax or too firm but it's such a complex issue. It's really hard to force a community in certain direction. It's more about sowing the seeds with tools and ux and less about policies and rules... and then apply a light touch help it develop in the direction you want.

There's also a question of what the ultimate goal is. What's best for the most users? For making the most money? The biggest median satisfaction? To fulfill some aspirational teneth?

I think one of Reddit's fundamental problems at this size is that it is grown on the seeds of anonymity, user moderators and upvotes/downvotes.

It has served them well for a long time but chaos always ensues when a community reaches a certain threshold, and more pressure needs to be applied to keep it in check (if that's what you want)

Upvotes/Downvotes is a blunt tool and threads easily changes into who agrees with whom rather than promoting thoughtful comments.

User anonymity is great, but requires features around it at a certain size. A country has borders to keep criminals away and community needs a way to keep trolls at bay. If you just can create another account what's the problem with being a troll? One remedy might be a smarter karma system where more visibility is given to users that's posted interesting content, kinda lika slashdot.

User moderators are great when it works, like in some channels. But it's also a source of petty power struggles and dictators defending their fiefdoms. Reddit of course benefits tremendously from the work the "power" incentivizes these moderators do for free, but I keep wondering if at a certain size there needs to be more automation and checks and balances to avoid user moderators becoming destructive or slanted and put too much focus on the meta. Then again maybe some subreddits should be biased and let the mods rule as their will. It's a little weird though for big general subreddits for things like news and countries.

Anyway, Reddit is probably too much set in it's way to enact radical change without the users revolting, and there isn't proof that the model doesn't work, just that it has its problem, as all models probably would.

As I said, community dynamics are complicated. Will be interesting to follow Reddit going forward.

mhomde··on Why debugging is all about understanding
Over the years I've become more and more convinced that debugging has done a lot to develop my problem solving skills and analytical thinking in general. It's like being a full-time modern times Sherlock Holmes with the crime scene and tools neatly at your disposal.

Usually breakpoints and stepping through code solves things pretty easily but some bugs can be real stumpers.

Here's some of the tools I tend to use:

1. What has changed? What could have caused this bug to appear?

2. Verify fundamentals: Is it actually running the code I think it does. If I change something that should change something, does it change? If I break something does it break?

3. Verify Input: Make sure it's valid

4. Verify output

5. Timing issues?

6. Slowly remove code "around" bug until it works again

7. Or start back at something you know works and add back code until it breaks.

8. Break out the functionality into an isolated environment so you can test it separately so you'll know if the problem is within the feature or a side-effect of something else

9. If your code makes it too complicated to see and find the bug refactor until it isn't.

10. Go to sleep / Go on a walk. Let your subconscious process it

and finally, lot's of bugs are made self evident by well structured and refactored code, so don't get too busy working on the symptoms rather than the root cause.

mhomde··on My journey into Scandinavian design
I think those things are usually done with clicks of people while a "fika" will often apply to all in office. Like you yell "Hey, everyone let's go fika, and everyone goes fika". It's also usual to have a set fika appointment around 2 or 3
mhomde··on My journey into Scandinavian design
Yes, but there's also more implication of baked goods and communal chat with your colleagues
mhomde··on My journey into Scandinavian design
How the rest of the world can live without fika culture I'll never know
mhomde··on .NET Native Performance
I think you've misinterpreted, they're not pulling out of phones... just focusing on a fewer number of phones. Seems like a new flagship is coming around September

If you think MS ever would "pull out" of mobile and be satisfied with "being a guest in someone else house", your insane :)

mhomde··on .NET Native Performance
All Windows (Phone) 10 apps will per default be compiled with .Net Native
mhomde··on Visual Studio 2015 and .NET 4.6 Available for Download
hmm, I doubt it applies to Windows Forms and WPF... but I could be wrong
mhomde··on Visual Studio 2015 and .NET 4.6 Available for Download
Yeah, I've been a heavy Resharper user for a long time as well... but now I almost don't know which bulbs and stuff is VS and what is Resharper :) and Resharper re-binds some shortcuts. Feels like Resharper is a couple of steps in front of VS still though, the refactor LINQ expression functionality for instance is simply fantastic
mhomde··on Visual Studio 2015 and .NET 4.6 Available for Download
Hmm, in what sense, or do you mean it's feasible now? I was thinking that whenever I press F5 it should instantly run. It's insane that the computer just loiters around and doesn't compile until you explicitly tells it to, when it could do incremental background compiling... especially since the editor pretty much does that anyway to provide its intellisense and stuff. The build process seems very separated from the editor. Guess it's more complicated with app that's deployed to devices though.

Live-editing I was thinking more like I could change parameters and methods and have the reflect directly in an running app. Edit-and-continue has been around for a while but doesn't work on apps ... for probably natural reasons. Eclipse seems to have stuff like that

mhomde··on Visual Studio 2015 and .NET 4.6 Available for Download
I'm really loving how the refactor and generate stuff has developed over the years. It is such a different experience these days and I'm probably at least five times as productive as a result of it.

First we had no refactor tools at all, and how we survived I'll never now

Then basic refactor tools where introduced. You could call up a dialog to do explicit refactoring.

Then the generate functionality was introduced and you could start doing things like typing out a class name that didn't exist, right-click and generate a class and file with that name.

Now everything been taken to the far end. I can just edit parameters, types etc directly in the editor, a light bulb will appear, I click it and choose how it will apply refactoring regarding my changes. If I want to change the type returned from a method inherited from a base class I can just edit it in the derived class and have it apply it on the base class.

Same with generate, just type a lot stuff like you want it to be, a light bulb will appear and it generates everything with correct parameters and all.

If I want to break stuff out of a blob class to a another class called by the original class, I just highlight the methods in the editor and chose "create new class" and it will add initialization for the new class, a field or property for it.

Sometimes when I need to split a class in two there really isn't any good refactoring tool. So what do you do? Copy the class and rename it so you have them side by side in the same file. Eliminate the fields and properties for each that you don't want in either. It will now highlight all the code you've broken. Now delete and change all that has been highlighted. Then just click the light bulb and choose "move class to file named whatever.class". Voila! It's such a streamlined process.

Or just things like Ctrl-clicking something to navigate to it (or pressing F12). Or quickly finding what code calls a method. Or snippet templates like ctor or prop.

To put the cherry on the cake I can press Ctrl-M+Space and Ctrl-M+Z to have the Code Maid plugin reorganize the code and normalize white space.

Seeing, doing and navigating has all come together so nicely and totally changed the way I code. It has made constant and continuous refactoring feasible and effortless. The only downside is that I'm not always sure where Visual Studio ends and Resharper begins :)

The thing I miss though is unit testing being as "on-the-fly" and integrated into the editor. I'd love to be able to write mini-tests as annotations to methods and have VS highlight when it breaks them.

... and maybe continuous background compiling and "live-updating" of apps :)

mhomde··on Visual Studio 2015 and .NET 4.6 Available for Download
Ah, Intellitrace is pretty neat but I must confess I very seldom use it. For some scenarios it might be crucial but for most app development I think you can manage without it
mhomde··on Visual Studio 2015 and .NET 4.6 Available for Download
Uh, so if I'm interpreting everything correctly indie developers for Windows/Phone 8/10 can use community edition. The only feature really missing is TFS/Code Lens). That's pretty great! no need for me to keep paying for Professional.

(The Windows 10 stuff won't be available until July 29)

mhomde··on Ellen Pao Is Stepping Down as Reddit’s Chief
I think it's a little unfair towards Reddit. Any community large enough will be taken over by trolls if nothing else for the fact that they're the ones making the most noise. Subreddits are perfect way to contain those people away from others since the majority won't be posting in niché subreddits, and those few who do can be moderated.

If anything might be a lesson on community design it might be to put up a few more "barriers" between subreddits and the general population and think about how to control interaction between them.

mhomde··on Beware of “async void” in C#
Yes, it's probably closer to functional programming than OOP, but I feel that strict functional programming doesn't adapt well to some use-cases, and there really needs to be a modular model involved as well. I think a new mainstream language would be best to be a hybrid of some sort.
mhomde··on Beware of “async void” in C#
Yeah, but the problem with C# is not that it isn't working, and it is pretty legible and easy to understand.

The problem is the syntax and lack of some abstractions. F# syntax is probably more suited for a certain style of programming. You could try to rework C# without concern for breaking current behavior and making it more cohesive and consistent... but at that point it won't be C# I think.

What I'd really like though is a switch from an explicit parallelism/multi-thread/asynchronous model to an implicit declarative model with optional explicitness.

Let me explain what I mean. In many cases how code is executed should follow from the constraints of the computer/the types/side effects etc. If a programming language was structured so it was more about annotating those constraints then explicitly saying what to do, then the compiler and runtime should be able to optimize for us. Less risk of bugs and greater potential for advanced optimization.

Also a software program might need to run different on a computer with many cores and a single core, or one with a RAM drive rather than a HD, or whatever hardware constraints we'll have in the future. Implicitness in that way is much more agile.

Software built like this could even adapt and learn on it's own. Imagine you have a loop or something that performs an operation on a number of items. That loop could be parallelized, but should it? Right now that's a tricky question, it depends on the number of items and how demanding the operation. How much should it be parallelized? 2 operations simultanenously? 4? 24? Another tricky question. A smart program could profile itself continuously, see what typical input is and adapt itself accordingly.

I know many are afraid of a "black box" a 'la ORM's but I think at some point we have to let go to a certain extent and move to a higher level of abstraction, in the same way we went from assembler to c. Controlling specific cases explicitly when needed should be possible of course

mhomde··on Beware of “async void” in C#
On a related note, I really dislike the dispatcher paradigm, especially with the inclusion of async-await.

For good performance of IO async calls you usually want to call .ConfigureWait(false), otherwise it will wait for the UI context to switch back to, you might even risk thread starvation.

But now each async call is a potential switch out of the UI thread and certain crasch down the road, meaning you have to put Dispatcher.HasThreadAccess checks on all your UI methods. It just feels... clunky and unnecessarily explicit.

In my opinion UI controls should be able to handle switching to UI context themselves and not crash the whole program, or if nothing else you should be able to annotate methods as UI threads rather than the clunky HasThreadAccess syntax.

There's also these annoying "barriers" that you can't do certain UI stuff on background threads without some ugly hacks, like creating and working with images.

The Dispatcher is cool for being able to prioritize UI operations though

mhomde··on Beware of “async void” in C#
To make it perfectly clear , "async void" should be replaced with "async Task"

The async stuff is interesting in that akin to generics it has an almost cancerous effect on your code. When you start using them they tends to spread to large parts of your code base if you're not careful.

It's awesome that C# now has such good support for parallelism and asynchronicity... but I remain in the opinion that a lot of this stuff is grafted on to the language and at some point we need to start over from scratch. Already more and more of the code is taken up by crud that should be abstracted away.

mhomde··on Reddit's CEO Allegedly Fired a Worker for Not Recovering from Cancer Fast Enough
...and they even fired the guy responsible for secret santa. You can't even make stuff like this up or be more grinch if you tried to

https://www.reddit.com/r/SubredditDrama/comments/3bysny/rsec...

mhomde··on Reddit CEO Fired Employee Because They Have Cancer
So basically the opposite of Valve and Erik Wolpaw

https://en.wikipedia.org/wiki/Erik_Wolpaw

mhomde··on Front Page Subreddits Go Private in Response to Firing of Reddit Admin
Recommended reading :)

http://www.amazon.com/The-Starfish-Spider-Unstoppable-Organi...

mhomde··on Front Page Subreddits Go Private in Response to Firing of Reddit Admin
you think? :) yah it seems either to have some immediate reason or an ignorant one.
mhomde··on Front Page Subreddits Go Private in Response to Firing of Reddit Admin
Yeah, it's surprising there isn't any tools for vetting questions, and perhaps requiring accounts to have a certain age or karma... then again it kinda goes against the openness of reddit, which is nice and all but tends to break down when a site gets large enough
mhomde··on Front Page Subreddits Go Private in Response to Firing of Reddit Admin
I think a lot of the reddit administration tools, subreddit settings etc is still is catching up to its popularity
mhomde··on Front Page Subreddits Go Private in Response to Firing of Reddit Admin
I'd be surprised if it was about that (at least only) and not more about reddit wanting to bring AMA's back to a team at their SF office rather than NY... but your guess is as good as mine
mhomde··on Front Page Subreddits Go Private in Response to Firing of Reddit Admin
weird, maybe too many subreddit links looks like spam :)
mhomde··on Front Page Subreddits Go Private in Response to Firing of Reddit Admin
What a circus reddit has become. There's probably/hopefully more to this story but still. It will be interesting to see if reddit forces the hands of the biggest subreddits to open again.

Which raises an interesting question, who "owns" a subreddit, the mods? the subscribers? reddit? I also wonder if it's a good idea for a community like reddit to have "public facing" administrators

Many of the biggest subreddits are revolting against the "governing" and gone private in protest, for example:

/r/Iama

/r/science

/r/movies

/r/gaming

/r/history

/r/art

/r/AskReddit

/r/law

mhomde··on Front Page Subreddits Go Private in Response to Firing of Reddit Admin
why? I don't think i said anything untowards...
← PreviousPage 5 of 11Next →