• How to Utterly and Completely Secure a Computer, Device, or Network

    Just for curiosity, I was wondering if a there were a way to totally secure computers and communications, either at the same premisis, or across premises. I almost immediately hit on the Wikipedia article about air gaps. Air gapping is the following: ...
  • Windows Internals: VirtualAllocate, Paging, and Allocation Granularity

    In Windows Internals, I came across the following statement as I was reading (chapter 5, page 485):

    'Finally, when a region of address space is reserved, Windows ensures that the size and base of the region is a multiple of the system page size, whatever that might be. For example, because x86 systems use 4 KB pages, if you tried to reserve a region of memory 18 KB in size, the actual amount reserved on an x86 system would be 20 KB. If you specified a base address of 3 KB for an 18 KB region, the actual amount reserved would be 24 KB.'

    I had a hard time figuring out the math and picturing this in my head, so I made a diagram and that solidified my understanding. I am sharing that diagram and explanation here with you...
  • Using scanf_s APIs with char Types without Newline Problems

    To avoid pesky newline (\n) characters from previous inputs messing up a `scanf_s` of a `char` type, put a space in front of the `%c` in the format string.

    Instead of the following code:

    char c;
    scanf_s("%c", &c); // note no space in front of % in format string

    Use the following:

    char c;
    scanf_s(" %c", &c);

    I found this gem on Stack Overflow (the answer by Sourav Ghosh) here...
  • ps -elf: Filter Results Effectively and See if a Linux Process is Running

    This post shows how to effectively filter results from the ps -elf command run on the command line, and how to tell if a given process is running. Although I have only tested it using Ubuntu Linux 18.04, it should have pretty broad application to other Linux and Unix type systems...
  • Display the Ubuntu Linux Version Number from the Command Line

    This post shows how to display the version information in Ubuntu Linux from the command line...
  • C and C++ Pointer Tutorial

    This is the first in a tutorial series on C and C++ pointers. It is written for beginning programmers to clarify pointer concepts, but is a great refresher for all programmers. It includes code snippets, diagrams, and discussion text. For a more advanced, under-the-hood deep dive on arrays, pointers, and references, see this post. Let's dive right in...
  • Using tar to Archive, Extract, Compress, and Uncompress Files

    Here I show how to use the *Linux* `tar` command to create uncompressed tarballs (archives) and tarballs compressed with various compression algorithms, along with how to simultaneously uncompress (if necessary) and extract all the files into the current working directory....
  • Windows Internals: Determining WOW64 and if Windows and Processes are 32 bit or 64 bit

    Here I show how to use the `IsWow64Process2` API to determine whether a Windows 10 process is running under WOW64, and whether Windows and/or the process are 32 bit or 64 bit...
  • A Tour of C++: Arrays, Pointers, and References Under the Hood

    Continuing in my series on Bjarne Stroustrup's A Tour of C++, 2nd Edition, I elaborate in-depth on his treatment of arrays, pointers, and references. Many aspects of arrays, pointers, and references that need to be internalized by the developer are discussed in-depth from first principles, then illustrated in exercises by code, program output, and diagrams...
  • A Tour of C++: Range Based For Loop

    I have bought another book, A Tour of C++, 2nd Edition by Bjarne Stroustrup. Stroustup is the original creator of C++ and the author of many books on it that have been well received.

    Published in July of 2018, he does a 256 page whirlwind tour of C++, concentrating on C++17 (the current standard), and including some forward looking material for C++20 (draft). Much is backward compatible with the C++11 and C++ 14 standards and before. It is part of the The C++ In-Depth Series, whose authors were chosen by Bjarne Stroustrup...
  • Windows Internals: How to Configure Symbols in Sysinternals' Process Explorer

    I am following along in Windows Internals, Part 1, Edition 7 by Mark Russinovich, et. al. The book uses Sysinternals Process Explorer application heavily and discusses how to enable debugging symbols downloads via the Microsoft symbol server to enable resolution of raw address offsets in executables to symbolic names, for instance, in the Threads tab of a process's Properties dialogue box or in stack traces.

    However, I was not having much success getting it to work. His screenshot was correct, but the link he gave for information had an old windbg.dll path, and other articles on the web were also outdated or did not give the windbg.dll path at all. That is what threw me...
  • Networking 101: Home and Home Office

    Today's home and home office networks are miracles of modern technology: fast, reliable, and convenient (and safe if you inform yourself and keep up with security precautions).

    If the diagram below does not look familiar to you, and its components do not make sense, you have come to the right place. This is Home Networking 101, teaching the basics of understanding and working with your home network to keep it humming, and equipping you to make the most out of your computing experience...