Better HN
topnewbestaskshowjobs
Log inSign up

hackerm0nkey

62 karma · joined Sep 5, 2018 (8y ago) · 84 submissions

Java, Microservices, GoLang, Scala, Linux, UNIX, DevOps
Submissions

comment 6y ago · link · parent

It's a template, GDPR is EU-specific and not everyone in the world has to worry about that, it's just too specific a subject to consider in a generic template.

If an EU-based (or storing EU data) team need to jump start from this, one can implement that section on top and not have to wait until the end as you say. The aim of the template is to give you a head start in the right direction.

comment 6y ago · link · parent

I come more from a JVM world. But aren't there any DB migration/refactoring tools in Rails to allow for changes to propagate across tenants ?

E.g for the JVM, there's Liquibase and Flyway, and I agree with you, setting that up took a good part of a couple of weeks of dedicated effort.

comment 6y ago · link · parent

On more than one occasion I've started with a simple table for all tenants (where tenant = x) because we didn't know at the time if we will have many.

Then progressively when we understood how the service will be used, refactored to keep separate tenant's data separate.

Ended up with each tenant in a given schema, we were using Java and relied on Hibernate (ORM) to help connecting to the correct DB (it does support multi-tenancy) as well as on a DB migration tool (Liquibase) so any changes we made to the schema get replicated over all tenants.

comment 6y ago · link · parent

I have built many over the years in Java but nothing is public, I was thinking of abstracting away a Microservice template as a starting point for my projects.

What you are mentioning is a very specific example of that, happy to have a chat and perhaps we can build that together and open source it ?

comment 6y ago · link · parent

I think the world needs, "Scala, the Good Parts". Hope this book is it.

comment 6y ago · link · parent

I think they are both from the same author.

comment 6y ago · link · parent

Yeah, I am getting the same impression that the personal might have ads? not sure.

I am trying it now and the trial version doesn't show me ads, at least not yet ¯\_(ツ)_/¯

comment 6y ago · link · parent

Interesting, didn't know about SetApp before, thanks.

I wonder how they manage around DRM rights with the individual app publisher?

comment 6y ago · link · parent

> After 1 year, you can continue using TablePlus without any limitations but you can't upgrade to the latest version. If you want to upgrade, you must renew the license, the renewal fee is much cheaper than buying a new one.

This sort of put me off. Personally I am fine with a single user perpetual license for my use case. But as they are claiming it being a young project and likely to have more bugs than your average mature product. Why do you expect me to renew my license to get your updates ? doesn't seem fair.

> TablePlus is a young project, we fix bugs and add new features every day, then put them together in a new update released at the end of week/month.

That week/month could fall a year after the date of my initial purchase :(

comment 6y ago · link · parent

Ooh yeah. If you have ever integrated with Vantiv you will know what all this means. Heavy lifting is on the customer side. What a pain

41.

Slack brings back message formatting with Markup under a non default config

1 points · by hackerm0nkey · 6y ago · discuss

comment 7y ago · link · parent

Very useful article. Learned a couple of new things here.

While reading the idea that I know most of this, would that made me a data scientist? Jumped at me.

But then I quickly recovered from that thought that surely knowing some of the tools someone could use for a certain domain does not make you expert at that domain.

Might just be the case of same ingredients, different recipes.

comment 7y ago · link · parent

Haha. That’s me. Once you go ‘set -o vi’, you can’t go back

comment 7y ago · link · parent

yup, got the same reply back as well. Glad that our voice was heard

comment 7y ago · link · parent

That's interesting, thanks for (re)sharing

comment 7y ago · link · parent

fair enough, thank you :)

comment 7y ago · link · parent

Great article and nice style distilling all this into a bite size chunks.

Is it me or just the title is a little bit inaccurate in the sense that there's more to "How containers work?" than overlays, e.g. it made me think that it covers more than it actually does, e.g. cgroups, namespaces, etc...

Anyone knows of a more in depth coverage of containers building block type of article that allows one to build a rudimentary container from scratch to appreciate what goes into building one ?

comment 7y ago · link · parent

Yes, it's a welcomed side effect of TDD'ing, TDD is more of a design tool. But also I have experimented with writing tests before/after the implementation. Code with tests written first seemed to always be just to the point and get one in the mindset of thinking ahead of your edge cases and pin them down

comment 7y ago · link · parent

Yes, I understand what you mean. When I face uncertainty, I explore with not so much emphasis on testing. But once I am over with that exploratory phase, I funnel the learning into the TDD process to solidify my implementation and guide my design.

BTW, I rarely work from a well-defined spec these days.

comment 7y ago · link · parent

> This is a good point. Just like with anything in engineering understanding the process is more important than just following some steps because you think you should.

Music to my ears. We've been all at some point or another being followers to the cargo-cult. But taking a step back and evaluating things from first principles greatly help getting one's self out of being stuck in a rut. At the end of the day, there are no silver bullets. Everything has trade off, just pick whichever is the least worst :)

comment 7y ago · link · parent

TDD is also a design tool. I agree for newly written code, yes.

Writing a test before fixing a bug reveals the bug and solidify a proof that the fix addresses it adequately. So in this context, it's less about the design (since it's already there) and more about fixing and proving that the fix works.

comment 7y ago · link · parent

What code won't benefit from unit testing ?

If you don't know what to test, then you don't know what you are implementing. Find what that is, clarify it and pin it down with a test then move on to the implementation to make it happen.

If you don't know what the output is like, then do some exploratory throw-away work to know a little more. Then write the test that you would've written if you knew what the output is like.

tackle your problems one a at a time, not knowing what to test is not a good enough excuse to not test first.

Make it Work - Make it Right - Make it Fast (while still under the protection of your first-written test)

comment 7y ago · link · parent

exactly, lots of people are missing the point.

comment 7y ago · link · parent

> It works better on layered architectures, when you can easily just test the business logic independently of the framework/glue code. It has failed me for exploratory work, that's the one scenario where I just prefer to write code and manually test it, since I don't know what I want it to do...yet

Totally with you on this, when I am clueless about the what/how, I throw a bit of exploratory code and test it manually or semi-automated fashion. But once the learning has happened I will use the acquired knowledge to feed a proper TDD cycle to do it properly now that I know a little better.

comment 7y ago · link · parent

> With the kind of software I mostly write these days, I'm fortunate to be able to incrementally develop my code and test it under real-world conditions or a subset thereof.

What kind of software you write if you don't mind me asking ?and are your "real-world conditions" tests automated ?

> The upside is that I don't have to write "strange" code to accommodate testing.

Can you elaborate more as what you mean by "strange" ?

comment 7y ago · link · parent

> Do you write tests before the implementation? Absolutely, day in day out. New code and bugs fixing a like. It's the proof that I need to know that whatever code I am doing is an exact fit to the problem it's trying to solve.

> Can you describe the practical benefit? Testing first help me clarify my intentions, then implement a realisation of those intentions through code. Testable code has the side effect of being well modularized, free from hidden dependencies, and SOLID.

And it's also about making sure that whatever code you write, there's a justification for it and a proof that it works, could be seen more like a harness protecting you from writing things that you don't need, YAGNI.

> Do you happen to rewrite the tests completely while doing the implementation? I follow the classic TDD cycle, RED/GREEN/REFACTOR and I can not be any happier.

> When does this approach work for you and when did it fail you? The only exception to the above is exploratory code. I.e. the times where I don't know how to solve a given problem, I like to hack few things together and poke the application and see what happens due to what I have changed.

Having verified and learned more about how to solve that problem, I delete all my code and start afresh but this time TDD the problem/solution equipped with what I have learned from my exploratory cycle.

If you are in doubt or need further information to help you make your own decision about the matter, I can not recommend enough the classic TDD by Example from Kent Beck as a starting point.

For a more real-world view with an eye on the benefits of adopting TDD, have a look at Growing Object Oriented Software Guided by Tests, aka the Goose book.

comment 7y ago · link · parent

yeah, that's the problem. If they don't get the value of what a test gives them, and then the focus shifts to aesthetics and conventions, etc...

Personally when I review code, I look for the test, I need to find a way to tell me why that code exists and a proof that it works.

comment 7y ago · link · parent

tests can be used to clarify your intentions and what you are attempting to build. It's best place when you are actually starting from a clean slate.

Just write enough code to make the test pass, no more no less. Refactor and repeat.

In recent years I've never written any new piece of code without test first and can not be any happier. Beside the confidence a test gives you, it really a great way to pin down your thoughts and write what makes them meterialize.

comment 7y ago · link · parent

I have never done that in the past and entertaining the idea of resurrecting older macs I have and install a Linux distro on them.

I was concerned that I might run into driver issues and such and thought to see what others have experienced in this as I have seen mixed things doing a basic Google search.

123