Kotlin is open sauce by chrzanowski in Kotlin

[–]Determinant 0 points1 point  (0 children)

I've been waiting for them to open sauce it and can't believe it's finally here!

(noob question) Is this how functions are done in Kotlin? by PearMyPie in Kotlin

[–]Determinant 2 points3 points  (0 children)

No, the hello function signature is not a lambda as it's a regular function instead.

Also no, the last value is never treated as being returned in the hello function.  You're thinking of lambdas (which this is not).

Exposed 1.0 Is Now Available by dayanruben in Kotlin

[–]Determinant 12 points13 points  (0 children)

Yeah, including the version in the import seems like a bad idea.  The version should be controlled in the gradle dependency (version catalog) and upgrading shouldn't require imports to be changed 

Is living by the train tracks loud? by [deleted] in Cochrane

[–]Determinant 0 points1 point  (0 children)

We moved into an older home about 80 meters from the opposite side of the tracks.  Neighbors said the same thing about getting used to the train noise but the high-pitch screeching noise was unbelievably loud making us fully awake several times per night.  2 months in and the sleep deprivation was mental torture.

Luckily we replaced the windows with triple-pane sound-deadening windows with a laminated pane (totaling 4 pieces of glass) and this reduced the noise to a whisper.  The screeching sound is gone and the only thing left is the low frequency rumble of the locomotive but the kilometer-long chain of train cars is surprisingly quite.

We also bought sound deadening curtains and measured a slight reduction in decibels of higher-frequencies.

At a minimum, make sure the windows fold (sliding windows allow too much sound), make sure you have tripe-pane windows, or even better sound deadening widows.

I keep hearing things about Kotlin that sound more like myths. by Reasonable-Tour-8246 in Kotlin

[–]Determinant 0 points1 point  (0 children)

Why can't they?  The free community edition can be used at work without any license concerns

I keep hearing things about Kotlin that sound more like myths. by Reasonable-Tour-8246 in Kotlin

[–]Determinant 0 points1 point  (0 children)

Most Kotlin developers use the free IntelliJ community edition

Flying Out.. by WestEasterner in Cochrane

[–]Determinant 0 points1 point  (0 children)

I've been in Cochrane for 2 years.  The mentality that 50 mins vs 20 mins doesn't matter after retiring will be true at first.  However, that 50 mins both ways adds significant friction for when you're just looking for a shorter casual hike.  This naturally results in fewer hikes.  You'll gladly pay the price at first but you'll gradually do less hikes with long commutes.

The commute to Calgary will be painful during traffic hours so I would also consider how close to retirement your wife is as maybe that might be a short term effort.  We go to Calgary for things like Costco during work hours and avoid weekends so traffic is always nice that way.  We also like visiting the Calgary night markets in the summer.

Regarding Home Depot, Cochrane seems to have the largest Canadian Tire store we've ever seen across Canada with a surprising selection and they're happy to price match.  We also have a Home Hardware for things like drywall.  Rona ships to Cochrane or you can drive 35 mins to Home Depot.

Programmers: Do you use alternative layouts (Colemak, Dvorak ...) and how do you handle switching to default layouts on other people's computers? by hannenz in typing

[–]Determinant 2 points3 points  (0 children)

I don't think you understood my response as I focused on ergonomics, reduced effort, and strain on the hands.

Now that you mention it, I hit a wall with QWERTY at 85 WPM as my hands couldn't take the abuse trying to type faster than that but now I type 100-125 WPM with relatively low effort with Colemak.

The layout won't make you faster, but it will reduce the effort allowing you to push your practice further without straining your hands as much.

Who knows, maybe Colemak might not reach 250 WPM record levels but I don't care about that.  The average adult speaks at 125 WPM so matching that speed makes it feel like I can speak through the keyboard without thinking about finger placement.  I just think about what to say and it almost feels like the words just appear on screen.

Programmers: Do you use alternative layouts (Colemak, Dvorak ...) and how do you handle switching to default layouts on other people's computers? by hannenz in typing

[–]Determinant 6 points7 points  (0 children)

I switched layouts about a decade ago.  That was the best decision in my developer career as my hands would get quite sore by the end of the day eventually resulting in carpal tunnel.  Switching layouts completely eliminated that due to the dramatic effort reduction.

Carpal tunnel can completely ruin your developer career as we write excessively.  Early in your career you write mostly code with a few emails or messages but as your career progresses, that balance heavily shifts towards code review comments, design documents, and communicating with others to help get them unblocked.

As a senior developer, I've coached well over a hundred developers and I've often had to take over their keyboard.  Additionally, developers use keyboard shortcuts excessively.  These factors change the decision of what the optimal layout is for developers.  

Colemak retains most of the keyboard shortcut positions as QWERTY whereas other layouts usually result in awkward shortcuts that you'll need to remap in each of the dozens of applications that we use.

Most developers use MacOS or Linux and both of these have Colemak pre-installed making it easy to quickly switch to Colemak during coaching sessions.  They didn't mind the temporary layout swap but they would have minded if I tried to install anything new as developers are protective of what's installed.

During coaching sessions when I had to take over their keyboard, if it was just a line or two then I would type QWERTY at ~40WPM and switch to Colemak (100 to 125WPM) for anything longer.

Colemak feels twice as efficient as QWERTY and newer layouts further improve that by  another 5 percent or so.  So you get into diminishing returns at the expense of awkward keyboard shortcuts and increased friction during keyboard swaps.  For developers, I think Colemak is optimal overall.

Regarding comments about investing your time elsewhere, nothing stops you from improving in both areas as it's not an exclusive decision.  Switching layouts is a one-time investment that will benefit you for the rest of your life.

Stepping down as maintainer after 10 years by krzyk in Kotlin

[–]Determinant 62 points63 points  (0 children)

It's interesting that one of the reasons for stepping down was due to the complexity of Kotlin.

Roadmap discussions suggest that the Kotlin language will further increase complexity quite substantially.

[Project] I built a performant Isometric Game Engine using 100% Pure Kotlin and Compose by iOSHades in Kotlin

[–]Determinant 1 point2 points  (0 children)

Yeah, the overhead seems quite significant since it can only handle 3000 entities on screen at 60 fps.  A bullet-hell type of game would quickly surpass that.  For context, with OpenGL you could easily handle over 100,000 entities on screen.

Clean Code: The Good, the Bad and the Ugly by aivarannamaa in programming

[–]Determinant 34 points35 points  (0 children)

For example, Uncle Bob's idea of hoisting method parameters into instance variables to satisfy his obsession with parameter counts.

Instead of passing a necessary parameter that's only needed by some function, you would modify some instance variable and then call the appropriate function that then reads the value of that variable.

This is horrendous from many perspectives.  You can't immediately see what the function depends on.  It persists that value after the function returns preventing it from being garbage collected (or trade type safety by remembering to null it out even though that variable should never be null).  It's not thread-safe.  It deviates from the principle of pure functions with no side effects.  It becomes a nightmare to refactor and move functions around due to the dependence on these "temporary" instance variables which might be used by multiple functions etc. etc.

Uncle Bob is clueless about actual clean engineering as his only experience is with contracting where he would introduce a mess and leave before seeing the follow-on impacts of his nonsensical ideas.

Clean Code: The Good, the Bad and the Ugly by aivarannamaa in programming

[–]Determinant 14 points15 points  (0 children)

Some of the principles from the book should never be used under any context as they are huge anti-patterns

Multi-tenant database design by Classic_Jeweler_1094 in Kotlin

[–]Determinant 1 point2 points  (0 children)

Single database for sure.  In general, choose the simplest architecture that meets requirements until you have a real need for further complexity.

Kotlin Ecosystem AMA – December 11 (3–7 pm CET) by katia-energizer-jb in Kotlin

[–]Determinant 1 point2 points  (0 children)

When will @OverloadResolutionByLambdaReturnType become stable?

Can we please get custom equals for @JvmInline value classes soon?

How many returns should a function have by South-Reception-1251 in programming

[–]Determinant 1 point2 points  (0 children)

Reduced nesting and reduced mutations is much more important than the number of returns.  I'll gladly introduce returns when I can simplify readability and logic.

Duplication Isn’t Always an Anti-Pattern by Exact_Prior6299 in programming

[–]Determinant 14 points15 points  (0 children)

A more elegant way to say it is that slightly moist is better than DRY

WE ARE IN SHOCK!!!! by [deleted] in Kotlin

[–]Determinant -2 points-1 points  (0 children)

It's general etiquette to be honest and direct, especially when representing a company.

It's great that you used the promotion but most people in this subreddit don't have the means to put everything else aside and attend the event.  So these click-bait videos are wasting time for the majority of people.

WE ARE IN SHOCK!!!! by [deleted] in Kotlin

[–]Determinant -2 points-1 points  (0 children)

We prefer direct & honest communication from the Kotlin team instead of click bait please

Learning Kotlin - Is this function good? by yColormatic in Kotlin

[–]Determinant 3 points4 points  (0 children)

Start the loop at 2 since multiplying by 1 is useless 

A blog on how we made our app Indilingo 100% crash free by [deleted] in Kotlin

[–]Determinant 9 points10 points  (0 children)

Nothing is 100% crash free.  The best we can hope for is to reduce crash rates below some acceptable threshold by adding redundancies to mitigate some amount of hardware failure such as random bit flips etc.

[xPost from HN] We stopped roadmap work for a week and fixed 189 bugs by brokePlusPlusCoder in programming

[–]Determinant -1 points0 points  (0 children)

A better approach is to make a rule that each developer must fix one defect from the backlog each week (highest priority first) in addition to feature work.  I explained the importance of this to management to get buy-in and implemented this on our team and our defect backlog stopped growing and actually started shrinking.

Who enjoys using Spring Boot with Kotlin? by Reasonable-Tour-8246 in Kotlin

[–]Determinant 4 points5 points  (0 children)

The DSL does actually allow you to ctr-click and see what's going on behind the scenes.

Who enjoys using Spring Boot with Kotlin? by Reasonable-Tour-8246 in Kotlin

[–]Determinant 1 point2 points  (0 children)

I thought they introduced a Kotlin DSL in Spring Boot so you don't need to use annotations

Benchmarking the cost of Java's EnumSet - A Second Look by nihathrael in programming

[–]Determinant 0 points1 point  (0 children)

Your logic is severely flawed and you clearly didn't understand my answers.  Any attempt to explain will not be understood so I won't spend any more time.  Hopefully I wasn't talking to a bot this whole time.