Showing posts with label Update. Show all posts
Showing posts with label Update. Show all posts

Monday, March 12, 2018

Another Update



It is no shame to admit that this person is currently unable to make significant progress in solving Programming Challenge 16.12. As there is no way of telling how much longer it will take a decision had to be made. Instead of investing all energy into this one project, while there are still five chapters left to work through and many more Challenges waiting to be solved, this person has decided to continue on to the next chapter for now. 

Numerous possibilites were taken into consideration to determine what happens with Programming Challenge 16.12 in the meantime. For now the work on it will continue on the side. If it isn't taking away time and energy from the learning process, it will be kept up, until the problem is solved. Otherwise it will have to wait until the end of the book has been reached. This is for the reason that, since the newest revision of this book has some additional Programming Challenges in earlier chapters, solutions for these Challenges may also find their way to this blog. It is some additional exercise, so it would fit in well to come back to this as yet unsolved Challenge by that time.

For now, it is time to keep on learning, to make some progress, and to hopefully be able to finish this one Challenge soon. As always it is a pleasure to thank all visitors for the continued interest in this person's humble blog, a special pleasure to thank my followers for subscribing! To my fellow students, who may not have the luxury to move on, for whom there are grades at stake if they do not manage to solve a problem in time, don't despair and keep giving your best. When you are ready, get back to it and work on a solution in your own time, then solve it. Persistence is key!

Wednesday, March 7, 2018

Update

Dear readers, you may have noticed that there is a gap in numbers in between Programming Challenges 16.11 and 16.13. The reason is not that this person has skipped Challenge 16.12, quite the contrary. It is a very difficult challenge, thus it will take some more time to arrive at a solution, so instead this person decided to solve what felt to be a very easy last challenge of this chapter, then return to work on the more difficult one. This person will work hard to get it done soon, so as to be able to continue on to Chapter 17.

With this little update information out of the way, it is time for this person to take a small break to gather new mental energy, to finally also get done with Challenge 16.12. In the meantime I wish my readers, visitors old and new, and my fellow students all the best in their attempt to solve any problem however difficult it may seem! Give your best!

Tuesday, November 21, 2017

Happy 1st Birthday

It has been very quiet around here the past two months, but the completion of A Game of 21 marks the end of it. There has been many reasons, time issues, my incapability to get the game the way I want it, personal reasons also that kept me from finishing it earlier. I do hope that my visitors enjoy playing it, it would make me very happy!

Now, though, it is time for a little celebration. Four days ago, this blog turned one year old, so:

Picture courtesy of PublicDomainPictures.net

Looking back at the beginnings, there was so much this person learned about the C++ language since. What is and isn't possible, the fun one can have, how creative one can get with the language, and so many different things, about so many different topics related to programming challenge problems on the side. I must admit it was fun for the most part, very difficult sometimes, but my motivation never ceased as there is this one goal: To one day write and publish a game, however humble it may be.

Enough of that, and another aspect that is very important: You, my visitors, from all over the world, you are making it worthwhile to continue learning hard, and to share the fruits of the effort with all of you! I sincerely like to thank you all for your visit!

For this person it is now high time to begin working on the two Programming Challenges still left for this chapter. So, back to the IDE it is, and on to whatever is ahead past that. And, as always, I wish my fellow learners that they be able to finish their programming challenges faster than I, and to say thanks to my visitors old and new, regular or otherwise!

Sunday, July 16, 2017

Deletion and Updates

It has been quiet around here for almost 2 weeks, hasn't it? Then all of a sudden a new blog post is being uploaded and another deleted? What is going on? For one thing I didn't change any of my policies, for instance never change code once it has been submitted. Only in the case where there are bugs, or the code is in other ways being found to be faulty. So far it wasn't necessary to remove any code, and there is always a first, and this is the first case this has happened. 

The previous code for Programming Challenge 12.11 contained an error of sorts, or design-flaw rather. I sought help in a Coding community and received plenty of it. I got more help than I could ever have hoped for actually. In the beginning there was I and there was my code, I posted some snippets, of which I thought worked very well. In the following discussion I learned that I should not use a char array for division names but instead string class objects. This then led to lots of headaches on my part as I tried figuring out how to get a string in a struct into a binary file. 

I tried hard, asked many questions, and eventually managed to make things work. But instead of the fruits of all my labor in the past couple of days all you are getting to see is what seems like code containing minor changes? No fair! Of course it wouldn't be fair if I wouldn't share it with you. Here it is then, free for you to download and enjoy in all its sad glory. 

Example Files: CppSData.cpp
                         Xtra.dat

Of course you might think, why has this person not uploaded this code, and instead decided to upload another code as the solution to the Programming Challenge? To be honest with you? Doubts. While indeed the above code works, and I tested it numerous times, I still doubt that I should go with it until I learn way more about things. Until then I stick with what I know and can predict, which is reflected in the code I uploaded as solution. This will stay online as long as this blog will be live. (So, hopefully for eternity and a day ;-))

With this, I think, I will call it a day, and work hard to (finally) solve the next Programming Challenge. As always I would like to thank my visitors old and new, from all over the world, thank you for dropping by! I hope you found what you came looking for. Also many thanks for all the +s! My fellow learners I wish that you have a pleasant summer, and temperatures in a range allowing you to solve your own programming challenges without your brain melting. I hate the thought that I be learning alongside one of these:

Picture Copyright: PopCap Games


Saturday, January 7, 2017

A (very) tiny update

As you may or may not have noticed in my latest submission, there is another function in between all the lines of code:

         /* Call: catchInifiniteLopp */
         catchInfiniteLoop();

This one is a new function i fit into my universal Utility.h file, which, if you happen to use any of my code in part or in total - (please feel free to), you will need, for this function to work. There is nothing special about it. Basically it consists of these two functions:

   cin.clear();
   cin.ignore();

Also i decided to change my pause function which is also in the aforementioned header file. function, strange that i used it in there, before i even knew that it was a function in the first place. That aside, the important part about this change is is that now a potential security hole, or incompatibility, or resource hog - depending on who you ask it is, is closed and done away with. So far i used system("Pause"); in there to keep the console open. I was aware that it wasn't the best solution to go about doing this, but what did I know a mere 4 months ago when i started with the book, and made my first steps in writing any code in C++? I guess now I am, and you too, are going to be on the safe side.

If you wish to use my header file, you can download it here: "Utility.h"

And now it is back to more lines of code, half way through in this Programming Challenge section of this chapter, hurray for me! I wish all of my fellow learners success, as always, and hopefully you are better in keeping your code for the challenges shorter than I do. *sighs*

Thursday, January 5, 2017

Update

Instead of publishing a freshly solved Programming Challenge, I had to change two of my previous entries:

Programming Challenge 6.3 - Winning Division
Programming Challenge 6.4 - Safest Driving Area

Even though both challenges were technically solved and worked correctly as they were, my solution was not correct. The task was to pass the division name to the function in Challenge 6.3, and in Challenge 6.4 it should have been the region names. This did not happen, so I decided to republish both.

Had it not been for the fact that I am stuck at my current Challenge, looking at the solved ones to find a solution, I would probably have never discover it ... Glad that I did, so I could correct these most embarrassing mistakes ... (Sorry for this!)

Now it is time for a little Espresso break, and then back to work on the challenge that is currently fighting me with teeth and claws! 

Tuesday, December 6, 2016

Update

Hier ist die neueste Version meiner "Utility.h" header Datei, die unter anderem neue include und using direktiven enthält. Unter anderem ifstream und ofstream, zum Umgang mit Dateien. Wer sie verwenden möchte, kann sich unter dem folgenden Link die neueste Version herunterladen.

Utility.h