Thanks for the easy to follow getting started for Golang.
I did find an error in the first blog post when following the steps on a Mac.
You have the command cd $HOME/go && mkdir test - This creates the new directory, but does not place the developer in the "test" directory which means those following along will likely create test.go in the "go" directory and not the test dir which is where you need to be in order to follow the rest of the steps as written.
One of the big go gotchas is redeclaring a variable within a loop when using go routines/errgroups (https://github.com/golang/go/discussions/56010 / A decade of experience shows the cost of the current semantics).
Didn't seem to find it, but that's always a fun one.
Another good tip to reduce binary size is to check if all the imports used are really needed. Just using a constant from a package also pulls in all its code. It would be great if Go could do some link time optimization to remove all unused parts of packages during compilation.
It may be worth noting that HEIF supports some features not available in JPEG, such as transparency or 10-bit color support. Therefore, the conversion may be even more lossy than just re-encoding the image data.
Ok but godotenv is already able to do that. It can be used as a library and an executable godotenv -f /some/path/to/.env some_command with some args". I missed something ?
EDIT: Ok I understand the use case. It's to export vars from an env file. Sorry, I missed the point :)
This talk by Yehonathan Sharvit is about the principles of Data-Oriented programming and how to reduce the complexity of software. As the talk is not focused on Go, the video is an interactive session between our speaker and the #gofrm community.
Data-Oriented programming is a paradigm that aims at reducing the complexity of software systems and making the development experience more productive. Data-Oriented programming draws a clear separation between code and data. It treats data as a value that is manipulated by general-purpose functions. In this talk, we illustrate the principles of Data-Oriented programming in the context of a software production system. After attending this talk, you will be able to apply Data-Oriented programming principles in your preferred programming language, whether it's Object-Oriented or Functional, and reduce the complexity of the systems you build.
➡️ Yehonathan Sharvit ⬅️ (https://twitter.com/viebel) has been working as a software engineer since 2000, programming with C++, Java, Ruby, JavaScript, Clojure and ClojureScript. He currently works as a software architect at Cycognito, building software infrastructures for high scale data pipelines. He shares insights about software at https://blog.klipse.tech/, he writes technical books, he speaks at conferences and leads Clojure workshops around the world. He is the author of Data-Oriented programming, published by Manning. Yehonathan is passionate about making interesting things easy to understand.
iPrism Technologies is a global technology and process driven software, web and mobile app development company offering customer centric solutions with knowledge and experience of the entire IT lifecycle, we help enterprises streamline core IT processes and augment their competitive advantage.
Not sure I agree with most of this, but it's interesting to see another's approach to dealing with complexity.
The article correctly identifies complexity as the biggest problem with writing complex long-lived web applications, but then presents a series of ad-hoc solutions to specific problems (problems caused by the structure they have chosen) as the best answer. It would probably be better titled 'Things I learned writing go' or something similar, rather than attempting to frame different decisions trade/offs as anti-patterns.
To take one example, having one user model is good in that it is easier to maintain and less complex to think about, but the author advocates having a write model and an api model - in some circumstances that might be useful (where there are many private fields which must never leak to the view or require processing before presentation), but most of the time it's overkill and needless complexity.
hello
Very informative, John Doak!
Awesome!
Hi everyone!
How to earn points?
Great article!
Very informative! Thank you for sharing it.
Awesome video!
Thank you for the article!
I can't create a post so I'll leave this here
https://github.com/componego/componego - the most flexible component-oriented framework for GoLang applications.
Thank you this was very helpful!
How to earn points? Also, up vote button does nothing
Thank you for sharing. It was helpful.
hello
Hi golang news...
Good points were mentioned.
Good book with good points.
Thanks for the easy to follow getting started for Golang.
I did find an error in the first blog post when following the steps on a Mac.
You have the command cd $HOME/go && mkdir test - This creates the new directory, but does not place the developer in the "test" directory which means those following along will likely create test.go in the "go" directory and not the test dir which is where you need to be in order to follow the rest of the steps as written.
Looking forward to the rest of the series.
Excelent book!
Pretty sure you can set up aws to forward sqs to sns and have if then fan-out? I suppose this was for a specific use case?
One of the big go gotchas is redeclaring a variable within a loop when using go routines/errgroups (https://github.com/golang/go/discussions/56010 / A decade of experience shows the cost of the current semantics).
Didn't seem to find it, but that's always a fun one.
Awesome! Recently started using sqlite <> cgo and that's resulted in a fairly sizeable binary. Unsure if this will help much, but one to try out.
Zmzmzkzjzku
Another good tip to reduce binary size is to check if all the imports used are really needed. Just using a constant from a package also pulls in all its code. It would be great if Go could do some link time optimization to remove all unused parts of packages during compilation.
It may be worth noting that HEIF supports some features not available in JPEG, such as transparency or 10-bit color support. Therefore, the conversion may be even more lossy than just re-encoding the image data.
hjhgfhffm jkh khl hilh ilkh il hli
https://github.com/chieund/golang_learning
https://github.com/chieund/golang_learning
https://github.com/chieund/golang_learning
I am interested
Hi i am interested for the job opportunity.
Helpful! Thanks for sharing
Heyyy
. Could you please upvote this comment?
I stared. Could you please upvote this comment?
I stared. Could you please upvote this comment?
I stared. Could you please upvote this comment?
I starred. Could you please upvote this comment?
Hello I don't get it
Nİce very nice I loving it
Nice I like the video
Can I post a open Golang job here?
Thank you for this.
Would you like to help out?
hello all - glad to join GolangNews!
Certainly useful. Thanks
That should definitely help with performance!
I found this article while trying to implement quicksort, super interesting!
// try to avoid this pattern
What to avoid, why to avoid? No explanation at all! In the end it's perfectly fine to ask for environment variables. Just don't do it every time.
I guess @jot thinks os.Getenv is called all the time here and she/he could be right.
Or @jot is talking about something completely different, nobody knows.
Saying to avoid something without explanation isn't very helpful. All I could do was guessing.
Very nice. stdlib, one of those strong features Go is built upon. But please do not use these kind of snippets in code:
if os.Getenv('ENV') == "prod" // try to avoid this pattern
Even in examples. People tend to use what they see, especially in well written articles such as yours.
Ok but godotenv is already able to do that. It can be used as a library and an executable godotenv -f /some/path/to/.env some_command with some args". I missed something ?
EDIT: Ok I understand the use case. It's to export vars from an env file. Sorry, I missed the point :)
Direct Link to my Golang Jobs Board: https://golangjob.xyz
Hello how do I get registered, want to post a blog link of mine (using go) https://blog.rutjes.dev/2022/04/cloud-cost-savings-using-hybrid_15.html
Would love to submit a blog : https://blog.rutjes.dev/2022/04/cloud-cost-savings-using-hybrid_15.html
Hi all
Best library to read xlsx in go. Too bad there is no equivalent to read xls
This is a really helpful go lib.
This looks great! Thanks for posting.
good stuff
Really nice post. We are thankful to you for sharing it.
Thank You For Sharing.
In some case, customizing GC is nice.
Easy with JVM, not possible with Go.
Example: do not free memory in serverless function, in order to prevent GC pause.
Very nice to see Fuzz testing in the standard library.
No more third party tools needed! \o/
Looking for a benchmark for generics vs reflection !
This talk by Yehonathan Sharvit is about the principles of Data-Oriented programming and how to reduce the complexity of software. As the talk is not focused on Go, the video is an interactive session between our speaker and the #gofrm community.
Data-Oriented programming is a paradigm that aims at reducing the complexity of software systems and making the development experience more productive. Data-Oriented programming draws a clear separation between code and data. It treats data as a value that is manipulated by general-purpose functions. In this talk, we illustrate the principles of Data-Oriented programming in the context of a software production system. After attending this talk, you will be able to apply Data-Oriented programming principles in your preferred programming language, whether it's Object-Oriented or Functional, and reduce the complexity of the systems you build.
➡️ Yehonathan Sharvit ⬅️ (https://twitter.com/viebel) has been working as a software engineer since 2000, programming with C++, Java, Ruby, JavaScript, Clojure and ClojureScript. He currently works as a software architect at Cycognito, building software infrastructures for high scale data pipelines. He shares insights about software at https://blog.klipse.tech/, he writes technical books, he speaks at conferences and leads Clojure workshops around the world. He is the author of Data-Oriented programming, published by Manning. Yehonathan is passionate about making interesting things easy to understand.
➡️ Learn more about Yehonathan's DOP challenge: https://blog.klipse.tech/dop/2021/04/01/dop-challenges.html ⬅️
📘 If you want to order Yenothans book Data-Oriented Programming: https://livebook.manning.com/book/data-oriented-programming/welcome/v-14/, you can use our 35% discount code: mtpffmgo21. 📘
00:00 Introduction Yehonathan Sharvit
06:18 What is complexity? 😰 & Information systems
09:16 Principles of Data-Oriented programming
14:10 What makes a software system complex?
17:36 Principle #1: Separate Code from Data
27:55 Principle #2: Represent Data with generic data structures
39:25 Data is represented as data
42:03 Principle #3: Do not mutate Data
45:14 Immutability in practice (native data structures)
46:54 What about data validation? & Data validation
55:30 A brief history of Data-Oriented programming
57:36 Summary
58:40 DOP challenge
A small copy-paste typo can be found at end of slide §6.1 Generic Keys and Values functions from x/exp/maps.
Values was mistyped Keys:
for i := 0; i < 5; i++ {
fmt.Printf("Values: %#v\n", Values(m))
}
Good catch ! Fixed, thank you.
https://participer.lausanne.ch/profiles/sultantoto88/activity
https://www.openrec.tv/user/a3h0ewd2gr4nj8zmamnl
https://participa.reus.cat/profiles/sultantoto88/activity
https://cyprus.com/author/sultantoto88/
https://coub.com/sultantoto88
https://etats-generaux-du-numerique.education.gouv.fr/profiles/sultantoto88/activity
super cool
awesome
Not strictly go related but I thought it was really interesting.
Hey, first time commenting here
awesome
Searching for a ways to integrate Go WASM with Cloudflare workers. Maybe you have some ideas or start points?
Wasmer works well, but i never tried with Cloudflare workers
Sorry for the late reply, I didn't get any notification about your comment.
No, I have never worked with WASM or Cloudflare, sorry :/
Valuable information for golang developers
niice
Also of interest https://mobile.twitter.com/FiloSottile/status/1455260886910783501
Interesting project. Can't wait to see what it will look like in a few months
Nice
iPrism Technologies is a global technology and process driven software, web and mobile app development company offering customer centric solutions with knowledge and experience of the entire IT lifecycle, we help enterprises streamline core IT processes and augment their competitive advantage.
Please avoid posting jobs without any details.
This page seems to be blank?
The article correctly identifies complexity as the biggest problem with writing complex long-lived web applications, but then presents a series of ad-hoc solutions to specific problems (problems caused by the structure they have chosen) as the best answer. It would probably be better titled 'Things I learned writing go' or something similar, rather than attempting to frame different decisions trade/offs as anti-patterns.
To take one example, having one user model is good in that it is easier to maintain and less complex to think about, but the author advocates having a write model and an api model - in some circumstances that might be useful (where there are many private fields which must never leak to the view or require processing before presentation), but most of the time it's overkill and needless complexity.
Super cool, these guys make great articles about making clean web applications in Go
404 I think this is the new url https://git.mills.io/prologic/fbox
amazing!
agree! I used it in my project go-stash, and it's much faster than encoding/json.
Is that ok for remote from China?
US and Canada only unfortunately.
what's advantages over x/ratelimit?
I've used it for a while, it's awesome!
I'm wondering how to get points.
As of today TinyGo supports more than 60 different boards!
Also the list of supported devices in the drivers repository is fast growing. Find them here: https://github.com/tinygo-org/drivers
Thanks for sharing. Is the build caching behavior still the same today?
Nicely explained.
Most important takeaways (for me) are: Use table driven tests AND use interfaces, so you can mock stuff :)