Better HN
topnewbestaskshowjobs
Log inSign up

ducharmdev

893 karma · joined Oct 2, 2020 (6y ago) · 241 submissions

Submissions

comment 5y ago · link · parent

Yup, I'm doing Rust this year as well. I've worked through rustlings a couple times in the past, but haven't had many excuses to use Rust.

I was proud last year when I got to day 18 with Python, but I'm setting the bar much lower this year. I don't have any experience with C/C++ (just C# and a bit of Go), so thinking more carefully about memory mgmt is new to me. But the functional aspects of Rust are pretty exciting.

152.

Advent of Code 2021(adventofcode.com ↗)

725 points · by ducharmdev · 5y ago · 264 comments

comment 5y ago · link · parent

Woah, no way. Although I could see this being abused, it's amazing that this even works.

comment 5y ago · link · parent

Maybe so; it's pretty normal to expect a property setter to perform additional operations, as it's necessary for making data binding more manageable among other things. But using Go to Definition takes me directly to the getter/setter, so imo it's not exactly hidden.

I think it becomes problematic (or more magical) when these network/database/expensive calls are made willy nilly throughout an application, without a dedicated class or layer to aggregate these kinds of operations. If you have things architected correctly, it's not a big deal to trace these kinds of things throughout your app.

comment 5y ago · link · parent

Is this really new though? MVVM .NET apps similarly use getters & setters in this manner, except with XAML.

comment 5y ago · link · parent

The caveat here, of course, being that memory limitations require us to prioritize what information should be kept in memory vs in storage.

Take LRU caches for example: it doesn't do us much good to devote that valuable memory space to information that isn't being recalled very often.

comment 5y ago · link · parent

Interestingly, I also considered doing a recent prototype in C#, but opted to try Django. I didn't hit any roadblocks like this though, overall the experience was pretty nice. The fact that the Django admin site allows you to get instant CRUD functionality from your models with almost zero effort is something I've not seen in other web frameworks (maybe nest.js gets close, but I'd love to see a .NET equivalent to the admin site).

comment 5y ago · link · parent

sCala

comment 5y ago · link · parent

As a joke, I'd love to see someone create a landing page of a "new" language with some eye-catching name similar to Kotlin, except it's all C#. I could easily see that hitting the top page of HN.

comment 5y ago · link · parent

Interesting, I wonder if a nuget package could act as a vehicle for this. Since this post is about a preview version though, have they addressed this for the final release next month?

comment 5y ago · link · parent

Interestingly, I think the exact same thing can happen with QA work. One of our QAs told me about a past dev that believed he was off the hook for QAing his own work, because "that's the QA's job". Unsurprisingly, he didn't last very long.

comment 5y ago · link · parent

For a lot of businesses, yes - that's exactly what they're striving for.

I think what's confusing to me about this and your previous point, is you mentioned this inability to access objective reality outside our own subjective experience, but now appeal to a shared human experience (i.e., there's a general human accomplishment we should all be working towards that goes beyond our subjective experience). I can understand one or the other, but it seems there's some tension between those 2 views.

comment 5y ago · link · parent

Given any entity that yearns for its own survival (a person, a business, an organism etc): does it matter whether it's means of observing the world are imperfect if said means are good enough to ensure it's continued survival?

comment 5y ago · link · parent

I went through vimtutor multiple times, until the basics stuck enough to allow me to (mostly) work without constantly looking at a cheat sheet.

I used the VSCode vim extension too, which I believe eased me into it since I was already comfortable with VSCode.

I know the extensions are limited compared to straight vim, but IMO at a certain point you get diminishing returns with time spent learning your tools. Personally for me, getting proficient in normal, insert & visual mode was most worth it; I'm sure I'd benefit from learning how to do crazy macros, but didn't see a need to go beyond that.

comment 5y ago · link · parent

This reminds me of that Silicon Valley episode about the pizza app, Sliceline. Solving a problem that doesn't need to be solved, and has to do with pizza.

comment 5y ago · link · parent

Wow, that's kinda magical. I had no idea that was a thing!

comment 5y ago · link · parent

This is so accurate, especially the 3rd bullet. When WFH, all interactions are centered around your immediate work responsibilities; although minimizing social interactions at work sounds great for some, it can make it much harder to gauge where you stand in relation to all the people you work with.

comment 5y ago · link · parent

Maybe so, but in the long-term, I can't help but imagine that a single WASM runtime for cloud functions has to be more predictable and easier to optimize compared to doing the same for the runtimes of all individual languages used. I think the promise of WASM is a huge reduction in duplicated effort industry-wide.

With WASI too, the possibilities for interoperability between languages looks promising. I would check out the Wasmer runtime if you're curious about it.

comment 5y ago · link · parent

I did something similar to learn Go & gRPC. I had a python client for displaying a simple COVID-19 report with the option to export as CSV, and had a Go server that sent a request to a public API to collect the data for the report. Did I need gRPC or the Go server? Not really, but when you're learning something new, there's a certain psychological benefit to being able to finish something using the technology you're learning. That, and you can focus more on the learning part instead of getting sidetracked by the other details of a larger project.

comment 5y ago · link · parent

Seconded. Nick Chapsas is another great backend engineering channel, but mostly sticks to .NET development.

https://www.youtube.com/channel/UCrkPsvLGln62OMZRO6K-llg

comment 5y ago · link · parent

Hello - I'm just over in Louisville myself. Is Lexington as .NET heavy as Louisville? I'd love to switch over to fullstack Typescript + Postgres at some point.

comment 5y ago · link · parent

> The tooling for other editors should be created or updated to allow developers to use their editor of choice.

Doesn't LSP enable this, to a certain extent?

comment 5y ago · link · parent

I believe they're intending to say that beautiful code == readable code.

comment 5y ago · link · parent

Here's an article with some examples:

https://learnsql.com/blog/sql-subquery-cte-difference/

You can think of CTEs as a way to save an intermediate query as a sort of temp variable/table that can be used in the final statement following `WITH something AS (...)`. They are great for flattening your queries and giving descriptive names to subqueries, and you can chain multiple WITHs together as well.

comment 5y ago · link · parent

Although I don't mind switch statements, I was thinking similarly about using early returns instead. But this is where switch/match expressions like in Rust or C# would really shine; it's too bad JavaScript/Typescript doesn't support them though.

comment 5y ago · link · parent

<script setup> looks awesome, makes components using the composition API look way more approachable IMO. I did a side project in svelte and really enjoyed the component layout, and have missed that when working in other frameworks.

comment 5y ago · link · parent

I think this puts it in perspective more; if I understand what you're saying correctly, then setup essentially gives you more fine-grained control over Vue's reactivity system, as opposed to just doing it all for you when a component is created. Which allows you to more easily pull out & consolidate reusable logic as needed.

It is kinda nice making reactive state really explicit like that; I like Svelte's approach for similar reasons.

comment 5y ago · link · parent

Just curious, but in your opinion, how does the composition API improve on React hooks?

I used Vue 2 for some projects a year or two ago, and recently have been comparing React hooks & Vue's composition API. Composition is definitely better than mixins, but as a new React user, hooks are feeling more intuitive right off the bat. With Vue 3, I feel like I have to decide for every component whether to stick with the options API or use the setup method, or end up with some awkward in-between.

I was always a big fan of Vue though; I'd appreciate any insight you can give on the Vue 3 additions.

comment 5y ago · link · parent

Wow, had no idea AngularJS hadn't hit it's EOL yet

comment 5y ago · link · parent

Definitely feel the same way about Alpine. Philosophically I get it, but I agree about how using attributes obfuscates too much. The idea of debugging js in attributes sounds horrible.

Not sure if you've used the multiline console that Firefox has, but I could easily see some repl-driven development with that; I just wish the other browsers had it too.

1
56789