HNHacker News
TopNewBestAskShowJobs

Bambo

491 karma · joined December 9, 2011

From the UK!
submissionscomments
Bambo··on Show HN: GNU Indent – CLI code formatting
I'm not sure if it is actively maintained, but another option for formatting C code is https://clang.llvm.org/docs/ClangFormat.html
Bambo··on Ask HN: Best way to learn C++ in 2022
A good way to learn more is to search for books about topics you're interested in e.g.; sqlite, zeromq, google testing libraries, opengl...

1. https://www.amazon.co.uk/Design-Patterns-Object-Oriented-Add...

2. https://www.oreilly.com/library/view/using-sqlite/9781449394...

3. https://www.glprogramming.com/red/

4. https://gameprogrammingpatterns.com/

5. https://zguide.zeromq.org/

Bambo··on Show HN: Embedded Ring Buffer C++98
Looking for CC, advice and bugs!
Bambo··on Ask HN: What is a good alternative to Clean Code?
"The Pragmatic Programmer" is much more detailed.
Bambo··on Ask HN: Is memory fragmentation with C still an issue?
A problem with the chunk system is that i don't know how big a chunk is at the time it's declared?
Bambo··on Ask HN: What is your single best advice for studying / acquiring new skills?
I like to apply the things i learn and enjoy how they change the way i work or do tasks!
Bambo··on Show HN: Design by Contract (tm) – C++
You can't implement the assertions at compile time since they are predicates evaluated at runtime. This is also why it is a performance hit on the code. I chose to use C-style macros because it is easier to debug than templates.
Bambo··on Show HN: Design by Contract (tm) – C++
Yes OLD stores the value of the variable before the execution of the DO.

This is because all of the virtual methods that have been overriden are visited in order to gather their assertions, but not execute their DO(). So while the assertions are being collected it also collects OLD() values which then can be tested at the called virtual method in its ENSURE() clause.

OLD is a complicated mechanism to implement in C++ because it requires saving current variables at the same time deferring the code to be executed.

Using the OLD() and ENSURE() (along with the other) clauses together, is described as subcontracting where subclasses "require less" and "ensure more", given in the https://en.wikipedia.org/wiki/Object-Oriented_Software_Const... (first edition).

Bambo··on Show HN: Design by Contract (tm) – C++
The exception throwing is a compromise, it allows you to view the stack trace in an IDE to find out which assertions failed.
Bambo··on Ask HN: Essential skill needed to be a programmer?
Imagination, to come up with solutions!
Bambo··on Ask HN: What did you make during lockdown?
I learnt C++!
Bambo··on Tell HN: C Experts Panel – Ask us anything about C
What is your favourite design pattern?
Bambo··on SeaMonkey 2.53.1
My windows defender indicates this has malware in the download.
Bambo··on Ask HN: What's the most valuable thing you can learn in an hour?
Encryption!
Bambo··on Vulkan Tutorial
All credit to the original author, https://while.io/
Bambo··on Show HN: Countdown – Twitter bot which tweets answers to the Countdown TV show
Yeah! it has a great description in the Readme too.
Bambo··on Show HN: NetLua – Completely managed .NET Lua
I've not had a chance to look too deep into it but if you find out let me know.
Bambo··on Ask HN: (Python) Web framework of the future?
Using web.py and loving it! http://webpy.org/
Bambo··on [dead]
Awesome app, albeit similar to algodoo!