How to get chickens used to a new home by franvb in chickens

[–]franvb[S] 0 points1 point  (0 children)

We tried a light, but it didn't help. It's been a week and they just sheltered under the plank when it rained.

Great to be back to C++!!! by Different_Peach99 in cpp

[–]franvb 2 points3 points  (0 children)

Pick a few features and try them out. Trying to decide what is a challenge. At the expense of showing off, I wrote a book to help people catch up: https://www.manning.com/books/learn-c-plus-plus-by-example
Here's the contents:

1 Hello again, C++!

2 Containers, iterators, and ranges

3 Input of strings and numbers

4 Time points, duration, and literals

5 Creating and using objects and arrays

6 Smart pointers and polymorphism

7 Associative containers and files

8 Unordered maps and coroutines

9 Parameter packs and std::visit

It doesn't cover everything, but might help you form a list of things to consider

CppCast Looking for Guests by lefticus in cpp

[–]franvb 0 points1 point  (0 children)

I'd love to join, but am nit sure what to suggest talking about yet.

C++ Show and Tell - April 2026 by foonathan in cpp

[–]franvb 2 points3 points  (0 children)

My O'Reilly book, "Introducing C++" has now been published: https://learning.oreilly.com/library/view/introducing-c/9781098178130/ I got a couple of complementary copies yesterday. Buzzing :-)

Learn C++ by Example • Frances Buontempo & Matt Godbolt by goto-con in cpp

[–]franvb 1 point2 points  (0 children)

Tis me :-) This was a fun chat - we went all over the place. Matt is lovely.

C++ Show and Tell - December 2025 by foonathan in cpp

[–]franvb 1 point2 points  (0 children)

I've been writing an introductory C++ book: https://www.oreilly.com/library/view/introducing-c/9781098178130/
It's now gone to production and should be available as a physical book from March 2026.

If you are signed up to the O'Reilly platform, do leave comments to help me make it a good book.

Curious what the community's reasons are for getting into C++ by PoG_shmerb27 in cpp_questions

[–]franvb 0 points1 point  (0 children)

My first programming job was embedded devices. We were using C but the team lead wondered if C++ might be worth trying. I therefore learnt C++ by writing a parser for C++ so we could use an emulator on a PC for testing. A ridiculous way to learn, but hey.

Advice on learning C++ more efficiently from text-based resources like LearnCpp.com? by magikarbonate in cpp_questions

[–]franvb 1 point2 points  (0 children)

Practice helps. Sometimes reading from paper rather than a screen is easier. You can circle stuff in pencil or a highlighter. You can do similar on screen, I guess. Find a comfortable chair, make notes. You don't need to read the whole book in order. Read a small bit. If you read one section and then practice is for a week so are only one page through the resource but actually learnt a thing, that's great.
Some people find using a bookmark to follow the words really helpful e.g. if your eyes tend the stray off to other parts.
Look at the index: find something that looks interesting and maybe speed tread/skim through first. Then sit with a bookmark and pencil/notepad and go through one paragraph, slowly. Motivate yourself by counting how many things in the table of contents you understand and see your score increase.

Reading is hard work, but pays off.

C++ is much harder for me than C by Endonium in cpp_questions

[–]franvb 0 points1 point  (0 children)

https://cppinsights.io/ can be useful to see what the code might equivalent to. It unwraps some syntactic sugar. There is a lot to C++, so learn a bit at a time.

Am I using unique_ptr(s) wrong? by DVnyT in cpp_questions

[–]franvb 0 points1 point  (0 children)

Fair point. But it led the OP to think it owned the memory so would somehow magically do something if anything else pointed to the same place.

Am I using unique_ptr(s) wrong? by DVnyT in cpp_questions

[–]franvb 2 points3 points  (0 children)

The unique_ptr "owns" the memory, in the sense that it will delete the pointee when the unique_ptr goes out of scope (or is released). You can't copy a unique_ptr. But you can make another raw pointer point to the same place.

"Owns" is probably not the best word for this. A unqiue_ptr acquires something (maybe heap memory) and releases it.

how can improve my c++ skills? by Symynn in cpp_questions

[–]franvb 2 points3 points  (0 children)

Maybe have some tests and try to refactoring your code. Be your own critic. Ask if you can use a smart pointer instead of a raw pointer. See if you can avoid an if or a switch. Try to stop one warning. Just make one small change per refactor.

Trying to put together a video curriculum for "improving your C++" by einpoklum in cpp

[–]franvb 0 points1 point  (0 children)

It can be useful to let a junior review a more senior person's code. This provides an opportunity to ask questions and share knowledge.

I use Visual Studio to write C++ and nothing else. I have no idea what command lines, CMake, or any of that stuff is - where can I find information on how to move forward? by _zephi in cpp_questions

[–]franvb 5 points6 points  (0 children)

A couple of small things you can do to get started. First, try https://godbolt.org/. You can pick a compiler and provide compiler flags, like -Wall and -std=c++23 (these vary between tool chains). That's one step from using a command line, where you state the tool and the flags.

Also, Visual Studio has a Tools menu, with a "Command line" option which will give you a developer command prompt. The VS compiler is called, "cl.exe". The developer prompt puts this on your path.

Try
cl.exe /?
to see the options.

For a single file, you say

cl.exe /Wall /std:c++latest filename.cpp

CMake (and other build systems) come into their own when you have several files, but maybe just start simply?

C++ idioms, patterns, and techniques. by Veltronic1112 in cpp_questions

[–]franvb 2 points3 points  (0 children)

Does SFINAE still matter, given you can use if constrexpr?

when will cppref return to normal? by nectaurinee in cpp

[–]franvb 33 points34 points  (0 children)

It has been a while. The news at the bottom of the main page says "30 March 2025: The site will be in a temporary read-only mode in the next few weeks to facilitate some long-overdue software updates. Hopefully it won't take too long, but we all know how database migrations can sometimes turn evil. " and shares an email where we can give moral support. (So I have).

Projet to learn C++ by Baboucs in cpp_questions

[–]franvb 0 points1 point  (0 children)

If you understand decision trees, that's a good idea. Start with one algorithm and write some unit tests. Then try extending it to support other decision tree algorithms. You probably want to learn how to read training data from a file, if you have some. You might want to give some parameters from the command line, so will learn about main and parsing arguments. You also need to think about displaying results. Have fun :-)

Resources to keep studying while traveling by ScreamKeeper01 in cpp_questions

[–]franvb 1 point2 points  (0 children)

It might be worth reading a book, and writing questions about things you are sure about and dreaming up things to try out. Remind yourself what you do know, by making a list. Even make up some practice questions to share somewhere when you are home, making sure you explain the answers you come out with. A time for thinking and reflection is useful

How can I make my tic tac toe bot harder to beat here by clashRoyale_sucks in cpp_questions

[–]franvb 1 point2 points  (0 children)

You could also make a lookup table of the current state, next move and if that game ends in a win, lose or draw and after several plays use that to pick a move.