Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
hacker_9
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
18 ms
·
181.
▲
by
hacker_9
9y ago
How are you equating breathing to be as difficult as being physically connected to another person 24/7 exactly? Additionally because of the join angle, you can never hold your head straight, meaning your view of the world is constantly
182.
▲
by
hacker_9
9y ago
Wow what an incredibly difficult way to live, even stranger that the person you share a brain with you will never physically see with your own eyes, because of the join angle. Hopefully one day scientists figure out a safe way to separate t
183.
▲
by
hacker_9
9y ago
Hire someone who has worked on legacy systems and practices TDD, then once hired give him the time he needs to break apart the codebase into testable units.
184.
▲
by
hacker_9
9y ago
Not XWT, but it's worth checking out Eto.Forms as it's very robust, uses native components, and you can build UIs using straight C#.
185.
▲
by
hacker_9
9y ago
No doubt you'll find lots of attempts on github, but no business will touch it unless it's an offical compiler with Microsoft's backing, who continue to release updates and provide support for it.
186.
▲
by
hacker_9
9y ago
DOM interaction and Garbage Collectors are still a heavy research topic within the WebAssembly community, and aren't part of the MVP [1]. Plus MS would need to create a custom C# -> WASM compiler as they don't use LLVM internal
187.
▲
by
hacker_9
9y ago
> This would allow any components built in any language to interface and work together using a common protocol No it wouldn't? How would a C++ app run my managed control built in C#? Or my JS page run components written in Rust, Jav
188.
▲
by
hacker_9
9y ago
This is a pretty neat idea, but I see no tests for the code or any sample usage. Looks like there's still a lot of work to do.
189.
▲
by
hacker_9
9y ago
I don't find this, people around always need to have the latest phone it seems, but for myself I bought the Note 4 back in 2014 and still have it today 3 years later. It's got a crack in the screen and apps open maybe a millisecon
190.
▲
by
hacker_9
9y ago
It'll definitely show you the changes, but how far back do you start from? and how many files do you do this for? In addition, it doesn't show you how the dataflow changed; you need to model that in your head still. Tests would al
191.
▲
by
hacker_9
9y ago
Tests make clear the intent of the code, how else can you get that exactly? And the next time you have to fix a broken unit test, think of how much time it has saved you by constantly running autonomously as part of your build process.
192.
▲
by
hacker_9
9y ago
> I asked one of the proponents how they handle the fact that tests can easily increase the complexity of a system by adding more code. Adding more code != more complexity. Complexity comes from high coupling between code, that doesn
193.
▲
by
hacker_9
9y ago
Somewhat disagree - you still have 'types' in JS, but the runtime just sees maps instead of concrete types. The concept is still there, but you won't get an error until runtime if you invalidate the models. At least with sta
194.
▲
by
hacker_9
9y ago
Tests define intent. Usually when you craft something, you have an idea of what you want going in. You may even draw it, and in the case of construction projects, fully 3d render it. Tests are the programmer equivalent, they define a contra
195.
▲
by
hacker_9
9y ago
Yeah I didn't mean integration tests were bad, just that you don't want to turn your unit tests into them unintentionally. Following the TDD mantra, you should absolutely have a failing integration test before writing integration
196.
▲
by
hacker_9
9y ago
You don't even have to think that far ahead - consider some code you wrote in week 1, that was then modified by a colleague in week 2, now you return to the code in week 3 - what does the code do? Any mental model you had at week 1 is
197.
▲
by
hacker_9
9y ago
So you disagree with TDD, but you need to rebuild your system from scratch every 5 years? I feel like this is an argument for TDD. As for throwing away tests; Unit tests are meant to be pretty simple - rule of thumb is you can run a thousan
198.
▲
by
hacker_9
9y ago
What exactly is your experience working in a commercial environment? When the updates you ship can affect tens of thousands of customers? In these situations, 'Sods Law' often comes to mind - "what can happen, will happen&quo
199.
▲
by
hacker_9
9y ago
I expect the reason TDD is so controversial on here is people can't see the long term benefits of tests, and instead only think in the short term. But in the commercial world, code you write can potentially have a lifespan of 30+ years
200.
▲
by
hacker_9
9y ago
This statement couldn't be more false, I can only imagine you've never written tests or worked in a TDD environment.
201.
▲
by
hacker_9
9y ago
"my team told me the tests are more complex than the actual code. (This team is not the original team that wrote the code and unit tests. Therefore some unit tests take them by surprise. This current team is more senior and discipline
202.
▲
by
hacker_9
9y ago
Legacy code = code without tests. You might write HQ code today, but without tests it'll become technical debt within a month or even a week down the line. Programmers come and go, unit tests are omnipresent.
203.
▲
by
hacker_9
9y ago
Anecdotally, I never watch the show anymore. Doesn't stop it always seeming to be on though when I'm channel flicking.
204.
▲
by
hacker_9
9y ago
The point is that tests are omnipresent, people aren't. I've worked at places where all sorts of dumb code has got through because there is no automation in place to stop it, and everyone else is too busy to do code reviews.
205.
▲
by
hacker_9
9y ago
No with TDD you don't need to go in with a structure in mind, the structures arise as you write more tests and get a proper understanding of what components you'll require. Red, green, refactor - each refactor brings you closer to
206.
▲
by
hacker_9
9y ago
Testing a database, or an external web service, is an integration test. They can be as simple as: void TestCreateUser() { var repo = new UsersRepository(); var mockUser = new User("John", "Smith");
207.
▲
by
hacker_9
9y ago
In C# we have Moq that can mock normal classes, though it requires adding 'virtual' to every method you want to override which is a code smell too. In Java everything being virtual by default I guess it doesn't matter. We lik
208.
▲
by
hacker_9
9y ago
To be fair, TDD is quite good for exploratory programming, as it makes you think about the intent or your API up front.
209.
▲
by
hacker_9
9y ago
Unit tests should follow a simple 'Arrange, Act, Assert' structure and test one single thing, described in it's title. I agree anything too complicated starts to defeat the point, especially when we are mainly after a quick f
210.
▲
by
hacker_9
9y ago
That's exactly my point, mock your external dependencies. Static calls don't allow you to do that.
More ›