Category Archives: Daily Blog

Generally a bunch of various small items that come up on a given day. Less focused than other topics, a catch-all…

JSON over stdin/stdout

I’m looking at adding a json over standard I/O pipes option to my tool from last weekend. I’m thinking of this as an intermediate option between interop type solutions (jni, pinvoke and such) and simple command line execution.

Adding in a –jsonrpc option to the tool that selects a mode where json object are read from stdin and json results are emitted to stdout seems like a pretty good option. This should provide an abstracted but tightly coupled interface between a piece of code running as a separate process and a language that may not have access to the APIs needed to get the job done.

This does imply that there will be one subprocess per parent process that needs access. The upside of this is that things remain modular where a problem with one subprocess has no effect on others in the system. We sacrifice a bit of efficiency along the way, but I can’t see that as a major issue in most cases.

Adding Boost to the mix…

I’ve built and used boost before and had good results. I’m going to add boost to my home C++ tools mix and I suspect I may find a workable json parser/generator in there. Grabbing the pieces now, but I don’t expect that I’ll have a usable build for a day or two given available cycles/time.

Built b2 and now I’ve bootstrapped the zip archive of boost. We’ll see what is there in the morning after the .\b2 run finished. I think I may wind up missing some interesting bits that require optional extras, but I should have a decent subset and can likely add in the missing pieces as needed.

A bit of C++ over the weekend

I spent a good bit of time over the weekend digging into some java coding for work. Wrapping some things up and the extra time will help.

I noticed that there is a third edition of effective java out there. I have the older edition, but it is really too old to be helpful with the current state of the java world. The ‘effective’ books overall have tended to be very helpful with usage, idioms and anti-patterns beyond the basic so I’m looking forward to reading this volume and seeing what it has to offer.

I spent a good piece of today writing up a free-standing command line tool to display the unique file id for windows files. The API that provides this is exceptionally useful when working with file cleanup in systems where there are mount points, symbolic links and other reparse points present. This API is not directly accessible from languages such as java or C# and thus an invokable command line tool seems handy. Interop and jni would also offer access, but the command line tool seems the most general purpose (if perhaps low on the performance scale).

I wound up writing a small command line option parser to support this work (though only used a little at this point). I’ll likely keep this around and use it in other tools going forward.

I’m also looking at adding a json output generation option and a stream in/stream out switch to make this little tool more useful for higher volume solutions with programmatic interfaces. It seems as if a json based programmatic interface using standard I/O streams would offer significant performance while also providing enough ‘traction’ to make program to program use of the tool practical.

I ran into a small hiccup this evening as I was unable to upload the code to github as github appeared to be suffering from some sort of relatively serious failure. Hoping that tomorrow morning things will be in better shape and I can push the code up then.

I will probably build a simple json library for local use over the next couple of days (I’ve done this before and it is relatively straightforward as json is a very regular and simple format). I need small and easy more than capable and fast so something coded locally seems best.

Recent E-Book Purchases

Packt publishing, Manning and APress have been key sources of software related books for a variety of topics. Lately they’ve also been pushing out daily deals on eBooks that have grabbed my attention in a number of cases. Packt in particular has deep discounts on selected books (and often even deeper discounts if you buy all four on a given day) so they’re over represented in my list.

I tend to buy on a wide range of software topics as my preferred roles touch on all aspects of the engineering process and having some background across that range improves my effectiveness immensely. I’ve listed my purchase prices to give an idea of how deep these discounts go.

  • Game Programming using Qt 5 Beginner’s Guide – Second Edition ($8.00) Aug
    QT keeps coming up in discussions of C++ based UI programming. It is cross platform and seems to be well supported while the Microsoft specific alternatives all have limitations and most are seriously showing their age.
  • Hands-On GUI Programming with C++ and Qt5 ($7.20) Aug
    Another QT book covering core QT programming (the games book sounded interesting as it likely covers more graphical and interactive QT). I’m going to have to find time to do some sandbox programming with QT sometime soon.
  • Qt5 Python GUI Programming Cookbook ($8.00) Aug
    Combines python and QT as an interesting mix. Python also keeps showing up out there and being able to build QT UI tools with python on the back-end would be quite useful in places.
  • Fixing Bad UX Designs ($6.40) Aug
    I’ve tended to operate mostly in the middle and bottom ends of software stacks in the past. I’m trying to improve my feel for the user experience end of things and the UX books on my list support this effort.
  • Hands-On UX Design for Developers ($6.40) Aug
    A more general purpose UX book.
  • Unity 2018 By Example – Second Edition ($7.20) Aug
    I’d love to find time to build some simple games…particularly if I can combine interesting game play with a networked back end. Unity seems like one of the best ways to make this happen so I’ve been slowly reading enough to find my way around (also one of the reasons for my blender reading).
  • Unity Virtual Reality Projects – Second Edition ($8.00) Aug
    I bought an HTC Vive quite some time ago and while it has been fun to play with (though currently buried in the basement as I sort through years of various items) I really want to do some programming. Unity and VR seem like a good combination…with C# on the back end even better.
  • Hands-On Full Stack Web Development with Angular 6 and Laravel 5 ($10.00) Sept
    I bought this because Angular is high on my ‘web UI’ list and my web hosting here is PHP only. This stuff could give me the ability to break free from WordPress a bit and put some more interesting content on the site.
  • React Cookbook ($7.20) Oct
    React (and Vue a bit) is the other web UI framework that seems to be popular. I’d like to become a bit more familiar with it when time permits.
  • React and React Native – Second Edition ($7.20) Oct
    Another React book with (hopefully) broader coverage and some React Native bits along the way. Web UI for the win?
  • D3.js Quick Start Guide ($2.40) Oct
    Part of a set of four (thus the very low price) covering some odd corners of the web UI universe.
  • Learn WebAssembly ($3.60) Oct
    I have been hearing about webassembly from a few people at work as an interesting technology. Hoping this book gives me some more depth on this front.
  • Learn Three.js – Third Edition ($3.60) Oct
    I’ve been poking at three.js and WebGL for a while now. Another book on the three.js side can’t hurt and for the price I couldn’t turn this down.
  • Mastering SVG ($3.60) Oct
    SVG also keeps coming up at work and while I’m aware of the technology and its basic outlines, I’ve not dug deeper to date. Going to read through this one and see what I can pick up.
  • Kotlin in Action
    Kotlin seems to be an interesting attempt to end-run the conservatism of the Java eco-system. I’ve been looking at it a bit for some time. So far I haven’t found time to do more than some reading though.
  • The Java Module System
    Java 9 feature that I’d like to know a bit more about.
  • The Joy of Kotlin
    More on Kotlin.
  • Web Components in Action
    More web UI advanced topics.
  • Clean C++
    Hoping for some additional insights into modern (2011/2014) C++ usage.

Bouncing around a bit…

…and I don’t think that’s a bad thing.

Still slowly reading VHDL material to get a feel for the language and prepare to work with the Xilinx Spartan-6 board I’ve got at home.

Doing some Win32/C++ investigations to support some file management/archiving tools that have been simmering for a long time but never yet finished. This also drives some C++/CLI work as I’m likely to use C# for the user interface on just about anything I write for home use at the moment.

Continuing Java and Functional programming investigations to support and enhance my current work role and project involvement.

Reading new material (the new Xiling Versal parts look very exciting for a range of applications). Revisiting some older material that I haven’t used all that much (USB hardware level, PCIe hardware level and formal forward error correction).

Kotlin continues to look interesting but not get any time devoted to actually reading the material I have on the language.

A bit of PHP and more WordPress as I look at some networked game stuff and adding another segment to my site here. I’m splitting off the ‘creative’ material from my general purpose blog (which will continue to host my photography for the time being). I’m trying to keep blog entries going as a replacement for my facebook presence. It is a way to keep people I know personally in the loop. This does clutter that area and so I’m setting up pandamallet.com to host more general interest things. So far the new site is skeletal at best, but I’m expecting to keep that moving forward soon.

Still planning to get my RepRap build moved forward. I must find time to read the plans for the Prusa i3 and figure out what my next steps are. I expect that the wooden frame will be right in there and likely followed shortly by buying some filament for plastics and some threaded rod for lead-screws. 

Work continues to eat well over forty hours each week and house projects take a bite as well. I expect this to keep on at least through the early parts of the winter as there’s much on the plate. Hoping to keep the interesting projects in the game a bit along the way.

Automation for PDF Viewing

I’ve wanted to automate view management for PDF documents for some time. It would provide a way to make locating the document I want and getting content up on the screen amid a mass of technical documentation much easier (and with the cryptic names that many companies use for their pdf files that can be a big deal).

Ideally I’d like to access the viewer over something like a DCOM automation link with full control over the view state and other particulars. In a pinch, I’d settle for process control, cross process window size and location management and some command line arguments to force the view mode and initial page view.

Here are some pages that might be helpful with this (still reading things but trying to keep a record here).

Another approach would be to find a PDF renderer that can be run inside a C# or C++ process. Looking there as well… Suspecting there may very well be a project or two on GitHub.

System Level Design and FPGA Options

Reading a few things last night there seem to be new tools that work at a more abstract level than VHDL out there. Mentioned were System Verilog, SystemC and Handel-C. I’ll have to take a look sometime in the future. For the moment I suspect that VHDL will more than meet my immediate needs.

I’ve also been looking at FPGA choices a little bit. The Spartan-6 on the breakout board I’ve got looks about right for my initial sandbox work. I’d like to find smaller, larger and newer options for ongoing things…ideally something that is inexpensive enough to use as glue/support logic and can be worked with without needing a custom PCB. It is also clear that the Spartan line is getting old and that Xilinx is shifting FPGA focus towards newer designs such as the Artix

I’d like to look a bit at the CPLD end of the spectrum as these seem to promise smaller, cheaper glue options, perhaps even with less demanding packaging choices. Wondering if Altera has interesting options there…

VHDL and CAN books…

Looking at books on VHDL and CAN bus. My Xilinx Spartan 6 board arrived a couple of days ago and now I need to get to the point where I can make real use of it. I’ve been looking for books to give me more depth in VHDL and a bit more context on CAN and here’s what I’ve come up with…

I’ve found two basic types of books in this area. There are those aimed at  people with little or no digital design experience that spend lots of time explaining the basics of digital logic design and synchronous systems and those that work at taking someone with significant digital design experience and getting them up to speed on how to realize designs in VHDL.

I’ve done enough digital design in SSI/MSI/PALs back when I was doing that sort of thing for work that I’m looking for the latter sort of books and my list below reflects that.

Seems like a decent book on logic synthesis in VHDL. Less expensive than the other broad based book I located but seems a bit narrower in scope.

.

.

.

This book looks more comprehensive than the one above, but it is also more than twice as expensive. I’m thinking that I may get VHDL for Logic Synthesis for now and buy VHDL for Engineers later if I find I’m looking for more information.

.

.

This looks like the best CAN bus book I’ve seen so far. Another rather expensive text, but if it can give me a decent feel for how to best use the facilities CAN provides then it will be worth the money.

I can see a number of different ways to implement a protocol using the functionality that CAN makes avaialable but getting advice on what has worked for others will make it more likely that my first shot is sensible and effective.

.

I ran across this book after I saw the earlier ones (and in the context of the following volume that appears to provide more advances style and implementation approaches). I suspect this is likely a decent book…perhaps with more introductory digital design content than I’d generally prefer though. I may look closer at this one at some point.

.

.

I find myself frequently looking for books that go beyond the basics of syntax and function to discuss best practices and effective usage (and books with ‘effective’ in the title often seem to offer this sort of advice). This looks like an interesting book on the VHDL front from that perspective. I’ll likely buy one of the more general volumes above and read it through first, but once I’ve covered the basics, I’ll likely wind up here to try to refine my understanding and usage.

Just ordered an FPGA breakout board

I was reading a book on VHDL (I’ve had some contact, but long ago and somewhat tangential) last night.

I just ordered a Mojo v3 FPGA Development Board  from SparkFun so that I can do some more tangible experimentation with soft hardware 🙂 

It appears that Xilinx has a new version of their toolchain for the Spartan 6 FPGA that is on this board that works on windows 10. I’ll have to download the software and follow their instructions tonight or tomorrow night. I don’t have any specific project plans related to the board at the moment but for $75.00 or so it presents a great opportunity to play with VHDL on a real target.

I’ve been running into a few cases lately where it would be helpful to be better versed in VHDL and for home projects I can see many places where programmable logic would be superior to an embedded controller.