Yahiya

1.2K posts

Yahiya banner
Yahiya

Yahiya

@yahiyadev

Senior Golang Developer ex @smcglobal ex @project10k_tech | Building Fintech products | Tweets about backend, performance & Go.

India Katılım Şubat 2017
194 Takip Edilen1.6K Takipçiler
Sabitlenmiş Tweet
Yahiya
Yahiya@yahiyadev·
golang interview problems for senior role: 1. What are method sets? how do you decide when to use value receiver over pointer receiver? 2. How does the Go scheduler work? What happens during a goroutine context switch? 3. Explain escape analysis and provide examples where variables escape to the heap. #golang
English
9
9
240
45.7K
Ahmed Shawky
Ahmed Shawky@lnxg33k·
🚀 We're hiring! React Frontend Engineer (Remote) At @CyberDefenders, we're expanding our engineering team and looking for a React developer to help build and scale our cybersecurity learning platform, used by thousands of learners worldwide. We want someone who's self-driven, communicates well, and embraces AI-assisted development as part of their daily workflow. If you love React and want to grow fast with a small, high-output team, we'd love to hear from you. Apply here 👉 forms.gle/vLWnBrYzXjVx2X…
English
29
21
360
23.3K
Yahiya
Yahiya@yahiyadev·
Protocol buffers: Designed by Google and released openly, Protobuf encodes data as a compact binary format using a schema defined in .proto files. Field names are replaced by integer tags (field numbers), so user_id becomes just 1, a few bits instead of a full string. message User { int32 user_id = 1; string name = 2; } Memory allocation: Protobuf is dramatically more compact., typically 3x to 10x smaller than the equivalent JSON. However, deserialization still allocates a new object tree on the heap. When you call User.parseFrom(bytes), all fields are decoded and placed into a freshly allocated object. The wire bytes and the parsed object both live in memory simultaneously during parsing. Post-parse, the wire buffer can be freed. The memory footprint of the deserialized object is usually 1x to 3x the wire size, since strings and nested messages still require heap objects. Serialization/Deserialization: Faster than JSON but still a full deserialize-to-object-tree step is required before you can read any field. FlatBuffers: Also created at Google, It takes a radically different approach: the serialized binary format is the in-memory format. Data is laid out in a flat byte buffer such that fields can be accessed directly via pointer arithmetic, no parsing step at all. table User { user_id: int; name: string; } Memory allocation: This is where FlatBuffers is unique. Deserialization is essentially ZERO-COPY and ZERO-ALLOCATION. the byte buffer from the network or disk is used directly, and field access is just an offset lookup into that buffer. You never allocate a separate object tree. Memory usage equals the size of the raw buffer, period. There is no "parsed copy" sitting alongside the raw bytes. Access pattern: flatbuffers.GetRootAsUser(buf).name() reads the string directly from the buffer's offset table. The tradeoff is that building a FlatBuffer (serialization) is more complex. you must write fields in reverse order due to the bottom-up construction model, and the builder requires a scratch buffer upfront.
English
1
3
28
2.1K
Yahiya
Yahiya@yahiyadev·
In FlatBuffers, ENCODING IS MORE EXPENSIVE THAN DECODING. That's the whole point of FlatBuffers. You pay more at write so reads are nearly free. FlatBuffers exist because many systems write once, read millions of time. The format deliberately front-load work into serialization so deserialization is just memory-mapped pointer chasing. Flat buffers are built back-to-front. You can't write a table until all its children (strings, nested tables, vectors) exist in the buffer. So every table needs to build children then build self. Decoding just follows pointers forward, one pass, no ordering constraint.
English
0
0
8
414
Abhishek Garg
Abhishek Garg@theabgarg·
just shipped a11y-panel to npm! 🚀 Plug-n-Play draggable widget. Drop it into your app and instantly give users the ability to tweak text, highlight links, and toggle high-contrast/monochrome modes. 📦 npm install a11y-panel
Abhishek Garg tweet media
English
1
0
4
101
Yahiya
Yahiya@yahiyadev·
I don't know why flatbuffers are not popular as protocol buffers. Even though it offers extreme read speed via zero-copy access (no parsing into intermediate objects). I know flatbuffers are used in Games & data visualization mainly but it can also be used in trading systems. They work well for high-throughput microservices where millions of messages flow per second. read about it here: flatbuffers.dev
English
1
1
7
651
Yahiya
Yahiya@yahiyadev·
@SreeYansh1957 Go through this post: x.com/i/status/19968… also see my older tweets about Go.
Yahiya@yahiyadev

I'm getting a lot of DMs asking for a roadmap or where to start learning Golang. Here's what I would do If I was starting to learn golang as a beginner: Some important topics are Interfaces, arrays, slices, maps, variadic functions, strings and runes, Mutex, defer, recover etc. (Spend 60% of your time on these topics below) master concurrency, goroutines, channels and then jump to concurrency patterns. Check out Concurrency in Go book. It's a good Book. Go to t.co/tZUYnDJgEW it's good for beginners and then see Golang's official Documentation. After that try to do some coding problems using go. Try to do string/data manipulation problems & try to think "how would I solve this problem in Go? What functions should I use? This will help you get comfortable & boost your confidence while learning Go. Make a habit of solving 3-4 problems daily. Write code daily even if you're following some tutorial, don't just copy paste the example, try to write by yourself. Do this for 1-2 months or take more time if you feel you're not comfortable. Then move on to build mini projects using the cobra cli library, APIs and utilise goroutines and channels. Explore frameworks gin, go-chi, echo etc. try to write API using each framework and use popular features of framework. analyze these frameworks, do the comparison side by side and decide which one would be best for your project. Implement authentication mechanism, circuit breakers, rate limiter etc. For example, you can create an API to fetch client's data from DB and write to a PDF file. Use pdfcpu library (you can find this on GitHub). If client's data is coming from different tables (3 or more), then use goroutines to write that data to pdf concurrently. This example taught me a lot of things. After you're done with this then learn about grpc. Tip:- don't learn everything in one go. Learn one thing then implement it and then move to another topic and in that 2nd topic try to use the 1st topic. Do this for all topics. You can look at my old tweets I've shared some good concepts All the best👍

English
0
0
0
2
Srimannarayana Kodamasimham
Srimannarayana Kodamasimham@SreeYansh1957·
@yahiyadev Hello Sir, I'm interested in learning GO Programming Language and can you help me with that Can you share some resources through which I can learn Can you also share some projects I can work with Are there any internships available for college students on Golang
English
1
0
1
10
Yahiya
Yahiya@yahiyadev·
golang interview problems for senior role: 1. What are method sets? how do you decide when to use value receiver over pointer receiver? 2. How does the Go scheduler work? What happens during a goroutine context switch? 3. Explain escape analysis and provide examples where variables escape to the heap. #golang
English
9
9
240
45.7K
Yahiya
Yahiya@yahiyadev·
🤣🤣
Kimi.ai@Kimi_Moonshot

Congrats to the @cursor_ai team on the launch of Composer 2! We are proud to see Kimi-k2.5 provide the foundation. Seeing our model integrated effectively through Cursor's continued pretraining & high-compute RL training is the open model ecosystem we love to support. Note: Cursor accesses Kimi-k2.5 via @FireworksAI_HQ ' hosted RL and inference platform as part of an authorized commercial partnership.

ART
0
0
2
241
Yahiya retweetledi
Vivek Galatage
Vivek Galatage@vivekgalatage·
The article describes allocation optimizations in the Go compiler - even if you don't write in Go, these detailed articles are a great read. go.dev/blog/allocatio…
Vivek Galatage tweet media
English
1
55
346
17.2K
Yahiya
Yahiya@yahiyadev·
Eid Mubarak
Eesti
2
0
5
187
Raashed
Raashed@rshdhere·
Eid Mubarak to all my tech bro's
Eesti
3
0
6
99
Yahiya retweetledi
Rowan Trollope
Rowan Trollope@rowantrollope·
Agents love the filesystem with MD files. But when you want to share your filesystem across multiple agents its tricky Check out redis-fs a POSIX compliant filesystem backed by Redis. Mounts as FUSE on Linux and NFS on Mac. github.com/rowantrollope/…
English
7
12
135
10K
Yahiya
Yahiya@yahiyadev·
With go-tui, you can define terminal interfaces in .gsx templates with HTML-like syntax and Tailwind-style classes. The compiler generates type-safe Go. github.com/grindlemire/go…
English
0
2
12
801