From c0d0b933003733d30768b3077dcd8593515617c3 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Tue, 30 Jul 2019 13:18:48 -0300 Subject: [PATCH 1/3] New chapter: Git flow --- content/books/things-i-learnt/_index.md | 1 + content/books/things-i-learnt/gerrit/index.md | 4 +-- .../books/things-i-learnt/git-flow/index.md | 29 +++++++++++++++++++ .../project-organization/index.md | 2 +- 4 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 content/books/things-i-learnt/git-flow/index.md diff --git a/content/books/things-i-learnt/_index.md b/content/books/things-i-learnt/_index.md index db8ff7b..f7fff4b 100644 --- a/content/books/things-i-learnt/_index.md +++ b/content/books/things-i-learnt/_index.md @@ -35,6 +35,7 @@ template = "section-contentless.html" * [Always Use A Version Control System](always-vcs) * [One Commit Per Change](one-change-commit) * [Gerrit Is A Mistake](gerrit) + * [Git-Flow Is The Way To Go](git-flow) * Project Organization * [Organize Your Code by Data/Type, Not Functionality](project-organization) * [Create Libraries](libraries) diff --git a/content/books/things-i-learnt/gerrit/index.md b/content/books/things-i-learnt/gerrit/index.md index eb48979..3468149 100644 --- a/content/books/things-i-learnt/gerrit/index.md +++ b/content/books/things-i-learnt/gerrit/index.md @@ -3,7 +3,7 @@ title = "Things I Learnt The Hard Way - Gerrit Is A Mistake" date = 2019-07-29 [taxonomies] -tags = ["en-au", "books", "things i learnt", "git", "gerrit"] +tags = ["en-au", "books", "things i learnt", "git", "gerrit", "source control"] +++ I hate calling software "a mistake", but I can't find any other way to @@ -33,4 +33,4 @@ the middle: gERRit. When I see someone using Gerrit, I know something is wrong there. -{{ chapters(prev_chapter_link="/books/things-i-learnt/one-change-commit", prev_chapter_title="One Commit Per Change", next_chapter_link="/books/things-i-learnt/project-organization", next_chapter_title="Organize Your Code by Data/Type, Not Functionality") }} +{{ chapters(prev_chapter_link="/books/things-i-learnt/one-change-commit", prev_chapter_title="One Commit Per Change", next_chapter_link="/books/things-i-learnt/git-flow", next_chapter_title="Git-Flow Is The Way To Go") }} diff --git a/content/books/things-i-learnt/git-flow/index.md b/content/books/things-i-learnt/git-flow/index.md new file mode 100644 index 0000000..a16001a --- /dev/null +++ b/content/books/things-i-learnt/git-flow/index.md @@ -0,0 +1,29 @@ ++++ +title = "Things I Learnt The Hard Way - Git-Flow Is The Way To Go" +date = 2019-07-30 + +[taxonomies] +tags = ["en-au", "books", "things i learnt", "git", "git flow", "source control"] ++++ + +If [Gerrit is such a mistake](/books/thing-i-learnt/gerrit), what can you use +instead? Git Flow! + + + +Git Flow is a plugin for Git for managing branches. It is based on the concept +of "feature branches", in which each branch is a feature or bug you're working +on. Once you finish it, it will just close the branch. + +Although there is a lot to be said about Git and how you should use it, the +fact is that Git Flow manages a lot of complexity of having a stable branch, +an "unstable"/testing branch and all features around those. + +Not only that, but with the current source control sites like Github and +GitLab, the flow is quite similar -- although working with branches is changed +with forks. + +You can even install Git Flow and use it on your personal project -- which is +something I do with this blog/book! + +{{ chapters(prev_chapter_link="/books/things-i-learnt/gerrit", prev_chapter_title="Gerrit Is A Mistake", next_chapter_link="/books/things-i-learnt/project-organization", next_chapter_title="Organize Your Code by Data/Type, Not Functionality") }} diff --git a/content/books/things-i-learnt/project-organization/index.md b/content/books/things-i-learnt/project-organization/index.md index bda33aa..272ac4e 100644 --- a/content/books/things-i-learnt/project-organization/index.md +++ b/content/books/things-i-learnt/project-organization/index.md @@ -81,4 +81,4 @@ transformations and such, but without the Data3 part). By breaking by their types, I managed to create small modules for each one and the new project would simply reference Data1 and Data2, but not Data3. -{{ chapters(prev_chapter_link="/books/things-i-learnt/gerrit", prev_chapter_title="Gerrit Is A Mistake", next_chapter_link="/books/things-i-learnt/libraries", next_chapter_title="Create Libraries") }} +{{ chapters(prev_chapter_link="/books/things-i-learnt/git-flow", prev_chapter_title="Git-Flow Is The Way To Go", next_chapter_link="/books/things-i-learnt/libraries", next_chapter_title="Create Libraries") }} From b868841b82d2e9bf24f60395fd2300211f131ecd Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Tue, 30 Jul 2019 13:32:58 -0300 Subject: [PATCH 2/3] New chapter: Own your shit --- content/books/things-i-learnt/_index.md | 1 + .../things-i-learnt/own-your-shit/index.md | 46 +++++++++++++++++++ content/books/things-i-learnt/time/index.md | 2 +- 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 content/books/things-i-learnt/own-your-shit/index.md diff --git a/content/books/things-i-learnt/_index.md b/content/books/things-i-learnt/_index.md index f7fff4b..092f467 100644 --- a/content/books/things-i-learnt/_index.md +++ b/content/books/things-i-learnt/_index.md @@ -96,3 +96,4 @@ template = "section-contentless.html" * [Don't Hide Your Stupid Solution](post-solution) * [Keep A List of Things I Don't Know](things-i-dont-know) * [You Always Have The Time](time) + * [Own Your Shit](own-your-shit) diff --git a/content/books/things-i-learnt/own-your-shit/index.md b/content/books/things-i-learnt/own-your-shit/index.md new file mode 100644 index 0000000..469e229 --- /dev/null +++ b/content/books/things-i-learnt/own-your-shit/index.md @@ -0,0 +1,46 @@ ++++ +title = "Things I Learnt The Hard Way - Own Your Shit" +date = 2019-07-30 + +[taxonomies] +tags = ["en-au", "books", "things i learnt", "personal", "own your shit"] ++++ + +When I said "Scala is garbage" or "Gerrit is a mistake", it wasn't "l33th4x0r" +who said that; it was Julio Biason. 'Cause I do believe that putting your face +to be slapped is the way we grow. + + + +I do understand -- and you must have realized reading some of the previous +points when I talk about it -- that privacy is important. For some people, +hiding their real name is important for lots of reasons. + +But I also personally believe that using some weird name and some face that +isn't yours on your avatar may give you a false sense of "that person is the +guilty one, not me" when it comes to criticism. + +I mean, yes, I hate Scala with a passion. I do understand _why_ the language +developers decided to come with some options about it, and I still think those +decisions were stupid and you should never sacrifice readability for +ease-to-use. + +But it wasn't some random person using a weird name full of numbers and an +avatar of some anime saying Scala is garbage. My name is even in this blog +name, in the URL and in every social network I use there is a picture of me. + +So yeah, Julio said Scala is garbage. + +There is another thing about using your real name and real face: I'm not just +saying "Scala is garbage", I have to back that up with some facts -- or, in +this case, personal opinions -- about it. It's not simply an attack to Scala, +is a somewhat thought out attack on Scala. + +And, on top of that, someone will one day come to me and say "Yeah Julio, that +thing you said about Scala: It is that way because of this, this and this". +And I'll probably have to say "You know, you're right: I was wrong." Because I +can't simply move my mistake to some other personality; who was wrong was +_me_. And unless I own my shit up, I'd never get the understanding I'd need to +see my mistake about Scala in the first place. + +{{ chapters(prev_chapter_link="/books/things-i-learnt/time", prev_chapter_title="You Always Have The Time") }} diff --git a/content/books/things-i-learnt/time/index.md b/content/books/things-i-learnt/time/index.md index 1eb6d23..df9f6fb 100644 --- a/content/books/things-i-learnt/time/index.md +++ b/content/books/things-i-learnt/time/index.md @@ -34,4 +34,4 @@ Maybe people think "If I don't finish, it's over". Your life doesn't end in one day. You still have tomorrow to keep going -- _to keep going_, not to start. -{{ chapters(prev_chapter_link="/books/things-i-learnt/things-i-dont-know", prev_chapter_title="Keep A List of Things I Don't Know") }} +{{ chapters(prev_chapter_link="/books/things-i-learnt/things-i-dont-know", prev_chapter_title="Keep A List of Things I Don't Know", next_chapter_link="/books/things-i-learnt/own-your-shit", next_chapter_title="Own Your Shit") }} From bc392961b37b614614500317c08bdfc7e7c98663 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Tue, 30 Jul 2019 13:41:03 -0300 Subject: [PATCH 3/3] new Chapter: one version to add, one to remove --- content/books/things-i-learnt/_index.md | 1 + .../things-i-learnt/add-then-remove/index.md | 33 +++++++++++++++++++ .../books/things-i-learnt/log-events/index.md | 2 +- .../books/things-i-learnt/monitoring/index.md | 2 +- 4 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 content/books/things-i-learnt/add-then-remove/index.md diff --git a/content/books/things-i-learnt/_index.md b/content/books/things-i-learnt/_index.md index 092f467..ae1f75e 100644 --- a/content/books/things-i-learnt/_index.md +++ b/content/books/things-i-learnt/_index.md @@ -64,6 +64,7 @@ template = "section-contentless.html" * [Not Just Function Composition, But Application Composition](application-composition) * [Even for Application Composition, Start Stupid](app-composition-stupid) * [Logs Are For Events, Not User Interface](log-events) + * [One Version To Add, One Version To Remove](add-then-remove) * [Learn To Monitor](monitoring) * Community/Teams * [A Language Is Much More Than A Language](languages-are-more) diff --git a/content/books/things-i-learnt/add-then-remove/index.md b/content/books/things-i-learnt/add-then-remove/index.md new file mode 100644 index 0000000..936d6cb --- /dev/null +++ b/content/books/things-i-learnt/add-then-remove/index.md @@ -0,0 +1,33 @@ ++++ +title = "Things I Learnt The Hard Way - One Version To Add, One Version To Remove" +date = 2019-07-30 + +[taxonomies] +tags = ["en-au", "books", "things i learnt", "versions", "upgrades"] ++++ + +A lot of things change during development. One day you need a field, another +day that field may be completely different. For those cases, use one version +to add the new field and another to remove. + + + +You have a database with a lot of customers and their ID is numerical. But for +some reason, they now need to be strings. Instead of changing the field type +and doing a whole migration, make a deploy with a new field, in which you'll +keep the old _and_ the new format going on and, in the next release, remove +the old field. No downtime. You can even run the migration while the system is +up, since the new field won't be used. + +(I'm simplifying the problem a lot here, 'cause the customer would have +references all around your system, but you get the point, right?) + +I had a problem in which we store the link for an object directly in the +backend (we shouldn't, that's a frontend problem, but that's a discussion for +another time); our interface is changing and so should the link. If we did a +change in the link directly, that would mean the backend would have to be +deployed _at the same time_ as the new interface; by adding the new link +format in another field, we can deploy the backend easily without breaking the +current system. + +{{ chapters(prev_chapter_link="/books/things-i-learnt/log-events", prev_chapter_title="Logs Are For Events, Not User Interface", next_chapter_link="/books/things-i-learnt/monitoring", next_chapter_title="Learn To Monitor") }} diff --git a/content/books/things-i-learnt/log-events/index.md b/content/books/things-i-learnt/log-events/index.md index ec8349a..834e018 100644 --- a/content/books/things-i-learnt/log-events/index.md +++ b/content/books/things-i-learnt/log-events/index.md @@ -43,4 +43,4 @@ could have the values to try to figure out why it failed -- surely, logging why it failed also helps, but you know what I mean. This is an example of something that makes complete sense in logs, but not in user interfaces. -{{ chapters(prev_chapter_link="/books/things-i-learnt/app-composition-stupid", prev_chapter_title="Even for Application Composition, Start Stupid", next_chapter_link="/books/things-i-learnt/monitoring", next_chapter_title=Learn To Monitor"") }} +{{ chapters(prev_chapter_link="/books/things-i-learnt/app-composition-stupid", prev_chapter_title="Even for Application Composition, Start Stupid", next_chapter_link="/books/things-i-learnt/add-then-remove", next_chapter_title="One Version To Add, One Version To Remove") }} diff --git a/content/books/things-i-learnt/monitoring/index.md b/content/books/things-i-learnt/monitoring/index.md index 854e6a5..e33ef92 100644 --- a/content/books/things-i-learnt/monitoring/index.md +++ b/content/books/things-i-learnt/monitoring/index.md @@ -26,4 +26,4 @@ If you're not measuring, you'll have no idea. Also, "If you can not measure it, you can not improve it", as Lord Kevin said. -{{ chapters(prev_chapter_link="/books/things-i-learnt/log-events", prev_chapter_title="Logs Are For Events, Not User Interface", next_chapter_link="/books/things-i-learnt/languages-are-more", next_chapter_title="A Language Is Much More Than A Language") }} +{{ chapters(prev_chapter_link="/books/things-i-learnt/add-then-remove", prev_chapter_title="One Version To Add, One Version To Remove", next_chapter_link="/books/things-i-learnt/languages-are-more", next_chapter_title="A Language Is Much More Than A Language") }}