Or maybe it's just me associating engineering with hard science.
223 karma · joined October 21, 2018
Or maybe it's just me associating engineering with hard science.
Sometimes it feels like developers are going in circles while trying to find the most optimal way to handle errors.
I've finished three of the challenges so far and I can highly recommend it. They make it very easy to get started and the automated tests are just super slick.
It's just such a good learning platform where you'll have to figure out stuff on your own, yet Paul was always very helpful on their discord in case I got stuck or hit technical issues.
Looking forward to the grep challenge!
But the great thing about their challenges is that they have you build some kind of sandbox that you can experiment on top of and try expand it with more features.
Those platforms more often than not demand constant care and effort in order to build and maintain an audience the artists can live off. Gone are the days where a band retreated into hiding to work on a new album while the label had their backs. If you stop feeding whatever opaque algorithm the platform runs on, you'll just slowly disappear. Worst case is that artists are forced to release nonsense because it's faster to produce.
Of course, that exact same problem always existed. But I think it's not hard to see how algorithm-driven platforms push this trend to the extreme.
And good luck appealing to Google when some bot decides to demonetize your videos.
Pros:
- Superb IDE. Nowadays even without Resharper, which was a must have in my early C# days.
- Massive standard library and extensive documentation makes for a very productive development experience (especially backends).
- dotnet core was a huge leap forward in terms of dev tooling (sane cli, 3rd party integration) and framework flexibility (configurability in general, config by code instead of XML)
- Microsoft keeps adding language features copied from functional programming languages.
Cons:
- Enterprise culture is very pattern-centric and produces much boiler plate code. That's the main reason I want to move away from dotnet.
- Desktop apps are not cross-platform and I don't trust their newer stuff to deliver on that promise. The older WPF is outdated (e.g. no inbuilt support for "newer" features like async/await) because of their focus on Xamarin and MAUI or whatever new fad they come up with.
- Microsoft seems to swallow open source libs by integrating them or copies of them (e.g. Newtonsoft.Json) into the standard lib. I'm not sure if this is a good thing. I know I'm contradicting the "massive standard lib" pro from above. But here I'm thinking long-term.
- New language features are sometimes done half-assed for backwards compatibility. E.g. nullable reference types that are just syntax sugar instead of a proper maybe monad with language integration.
Why not make it a functor too and add map()?
ok(1) |> map(fn v -> v + 1 end)
# ok(2)
Of course you can also make it a bifunctor by implementing bimap().
And what about filter()?
- obscuring language
- missing references and/or imprecise citations
BTW your link does not explain what a prompt is.
I skimmed through to understand what it's about or at least to know what a "prompt"/"spaced repetition" is. I still don't know, but I bet it's something very trivial.
It is when you don't use it right. Although, you have the benefit of being explicit about it. Still, you're supposed to make your Option/Maybe type a monad and functor, so you can easily chain Option/Maybe-returning functions and transformations while hiding all the boilerplate null checks.
The idea is simple and functionally it doesn't look like much. Yet I'm quite proud of it, because the implementation was much more difficult than expected for a couple of reasons.
Fighting the Visual Studio SDK: even though the VSSDK is super-powerful, some parts of it (especially CodeLenses) are very poorly documented.
UI styling: the VS team went out of their way to prevent extension developers from re-using the VS styles. They actually don't want extensions to look like VS for CI reasons. It took days of trying random stuff and digging through the VS DLLs until I found what I needed. I'm not even sure this was entirely legal.
Finding the IL for the code-lensed method: this sounded so easy in my head at first. VS/Roslyn gives you a MethodSymbol of the code-lensed method, I'll just have to find it's MethodDefinition in a Mono.Cecil AssemblyDefinition by name. But C# allows method overloading and suddenly I had to cook up a non-trivial matching logic that can resolve overloads without breaking my fingers or brain. Overloads can become arbitrarily complex (e.g. Foo<T>(List<T[]>), Foo<T>(List<List<T>>)) and of top of that the types that have to be matched with one another (MethodSymbols and MethodDefinitions) are structured differently in non-obvious ways.
Unit-testing the overload-resolution: in order not go insane, I had to have unit tests for the above. The idea for those was that each test gets the Roslyn MethodSymbol of a specific dummy C# method and then checks if the overload resolution can uniquely identify it in the Mono.Cecil AssemblyDefinition of the test data assembly where that dummy method is defined. Loading the test data assembly with Roslyn is easy enough, but how to get a specific MethodSymbol? If you only use the method's name, you'd have to deal with overloads again, only this time on the Roslyn side. The solution was to have a special selector method which takes a lambda calling the dummy method. The selector method would then use Roslyn to analyze the test's syntax tree, locate it's own call in the test case, grab the lambda argument passed to it, and then return the MethodSymbol of the dummy method referenced by that lambda. Pretty nifty, I think, but I later found it would have been easier to write only a single test case that just iterates over all MethodSymbols in the test data assembly and tries to resolve them using the matching logic. However, the disadvantage of that approach is that such a test case would lack focus and it would be harder to pinpoint what exactly went wrong when the test case fails.
If there really was a global movement superseding national governments then human civilization might have a slim chance, but only when employing drastic measures like global prohibition of cars, flights, meat, etc. as well as collectivization of all for-profit organizations.
You saying "there is always something we can do", is just you hoping some Silicon Valley startup invents a magic bullet in the future so that you can keep your standard of living.
As an exaggerated analogy consider a bus full of people seconds before it drives off a cliff. This paper would then be the guy in the bus that tries to warn us the tires might pop if we keep up this speed for 50 more miles.