• 1 Post
  • 60 Comments
Joined 1 year ago
cake
Cake day: June 11th, 2023

help-circle







  • Ok that is an impressive number but it feels a little disingenuous. You still need to something on your machine to interpret the js code, right? Is that included in the 13k? How much storage does that take?

    EDIT: Well this is by far my most negative comment here. That’s almost entertaining. I’ll share a few more of my thoughts here rather than respond to individual comments. Maybe the context will make this more palatable.

    First, I expect that the js language is doing most of the work here. Which makes sense. But having a browser installed as a prerequisite is an enormous dependency.

    How would that stack up against other languages? Can I build a 13k binary using C? How about C#? I think Go is maybe the most interesting because the binary is entirely self contained by default. No external dependencies aside from the OS. I don’t think this or a similar game is viable with only 13k. Which is fine! I just that I find 13k is disingenuous.

    That brings up the question of whether or not we should include the OS in the storage size. I would think not. But that’s only because the OS is (usually) the least common denominator when we talk about developing software. It’s generally assumed by default. But if someone wants to compare with a game that interfaces with hardware directly, then yes, we should absolutely include the OS as a dependency.

    Now that I’m giving this more thought, I suspect that the devs wrote 13k of code + assets to make the game functional. Still impressive. But the more I think about this, the more meaningless that number gets. Does pre or post compiling matter more? What if we compress the thing as tarball? There’s just too many ways to manipulate this number.




  • Test coverage is useful to measure simply because it’s a metric. You can set standards. You can codify the number into ci/cd. You can observe if the number goes up or down over time. You can argue if these things are valuable but quantifying test coverage just makes it simpler or possible to discuss testing. As people discuss test coverage and building tests becomes normalized, the topic becomes boring. You’ll only get thoughtful discussions on automated testing when somebody establishes a new method, pattern, etc. After that, most tests are very simple. That’s often the point.

    Even “testing on autopilot” has high value.

    You can build lots of useful front end tests. There are tools for it. But it’s just not possible to test everything because you can’t codify every requirement. E.g. ensure that this ui element is 5 pixels below some other element, except when the window shrinks, and …

    I haven’t seen great front end tests. But the ones I’ve seen mostly focus on functionality and flow rather than aiming to cover all possible scenarios. Unit tests are different in this regard.

    Integration testing makes sense but I find it hard to do in the time I have.

    This is a red flag. Building tests should be a planned part of your work, usually described as acceptance criteria. If you need 4 hours to write a code change, then plan for 8 or whatever so you can build tests. Engineering leaders should encourage this. If they don’t, I would consider that a cultural problem. One that indicates a lack of focus on quality and all of the problems that follow.

    Edit: I want to soften my “red flag” comment. That’s a red flag for me. That job isn’t necessary bad. But I would personally not be interested. It’s ok to accept things like, “we don’t write tests and sometimes we deal with issues”. Especially if it’s a good job otherwise.


  • Here’s my random collection of thoughts on the subject.

    I have no idea how common it is in general. Seems like some devs build tests while others don’t. This varies plenty on a team level as well as organization wide. I’ve observed this at small to very large companies, though not FAANG where I generally hope and expect that tests are a stronger standard.

    I will say that test are consistently and heavily used in every large, open source project that I’ve reviewed. At some point, I think quality test cases become a requirement.

    Here’s the big thing. Building automated tests is almost always a wise investment, regardless of the size of the org. Manual testing is dramatically more expensive and less effective than running unit and integration tests. I’ve never written unit tests and not found issues.

    More importantly, writing unit tests forces you to write code that can be tested. This is important. IMO, code that can be tested is 1) structured differently and 2) almost always better.

    Unit tests protect you from your own mistakes. Frequently. Integration tests protect you from other people. E.g when your code depends on an api and that api unexpectedly introduces a breaking change.

    Everybody likes having quality tests. Nobody likes writing tests.

    Quality tests are basically a strict requirement for fully automating ci/cd to production. Sure, you can skip tests and automate prior deploys, but I certainly don’t recommend it. I would expect people to be fired for doing this.

    Chasing 100% test coverage is a fools game. Think about your code, what matters, and what doesn’t. Test the parts that add value and skip the rest. This is highly related to how writing unit tests change your code.

    Building front end tests is inherently hard. It’s practically impossible to fully test front end code. Not even close.

    Personally, I like the idea of skipping tests when you’re building a POC. Before the POC is done, you may not know if your solution is viable or what needs to be tested. The POC helps you understand. Builds tests for MVP and further iterations.

    Quality ci/cd tests are complimented by quality observability, which is a large and independent topic.

    / ramblings of a tired mind









  • Well that’s an interesting take! What aspects are you opposed to?

    IANAL but I did read through the patents agreement that you linked. It basically says do whatever you want with Go as long as it different infringe on Google patents. Which is pretty much backed by US law anyways and I assume other countries as well. The sketchy part is that your license is revoked as soon as they file a lawsuit rather than win it. Honestly, I’d be surprised if Google ever used this in a legal dispute because there would be a huge community backlash.

    That also only applies to Go developers. You would only be a user for a tool written on Go. How does your using a tool written in Go translate to support for Google and its bad practices? Do you not use any software written in Go?

    Sorry if this is sounding argumentative! I’m generally a big fan of Go and definitely opposed to Google and using its products. This is a topic that I haven’t considered before so my questions represent my sincere curiosity.