-
May 30, 2013
Don’t Call Me at Work
Today I was sitting in the lab doing some computer stuff. The phone rings. The sound gets filtered out–the phone has rung hundreds of times and was never for me.
My supervisor picks it up: “Matt, it’s for you.”
Not knowing what to expect, I take the call.
“Hi, Matthew! My name is Something Sometherson! I’m a technical recruiter with–”
“I’m not interested,” I say. And then quickly, “How did you get this number?”
This tech recruiter had found me on LinkedIn and then looked up the phone number of my current employer. Really? Even if I had been interested in whatever she was hawking (I didn’t stay on the line long enough to find out), I’d have been pretty put-off by her calling my office.
Please don’t call me at work, especially if it’s to discuss other job opportunities.
-
May 17, 2013
Girl Develop It
Last night I volunteered at the Philadelphia chapter of Girl Develop It. GDI offers low-cost programming classes for women. One of my former co-workers who’s involved with GDI shared that they were looking for an extra TA, and I thought it would be a good opportunity to meet people in the local tech world and to hang out for a couple hours near the edge of my comfort zone.
The meetup I was TA-ing was Intro to the Command Line. I feel proficient enough at the command line (since I use RedHawk Linux every day at work) that I thought I’d be useful as a TA.
The class was a little over two hours. From the meetup description:
In this course, we will cover the basics of using a terminal to control *nix operating systems. In addition, you will also learn how to use it to manipulate such things as the filesystem, the built-in help commands, file contents, program I/O, and remote systems.
I answered the participants’ questions and enjoyed helping out. I’d probably go back if they asked me or if there were another class for which I felt particularly apt to volunteer. None of my close friends are computery, so it was nice meeting people outside of work who are interested in software development.
It was also refreshing to see women wanting to learn how to program. I don’t view women being underrepresented in STEM fields as a problem, as long as it’s by choice, but at the same time I’m kind of biased in thinking that software development is cool and girls might be missing out. I like what GDI is doing. The meetups are affordable (< $15/hr), and one can take the classes à la carte. If GDI is teaching people who otherwise wouldn’t have an affordable/comfortable/accessible forum to learn about development, well, that’s pretty nice.
-
Apr 17, 2013
There is No Right Way to Develop Software
There is no “right” way to develop software. I repeat: THERE IS NO RIGHT WAY TODEVELOP SOFTWARE. Some people in our industry like to cargo cult and don’t want to believe this. They believe that the sweet new hotness they learned a couple of hours ago is the only way to make things work and build reliable pieces of engineering.
-
Apr 5, 2013
Sick Day
Woke up before dawn this morning with heartburn, a headache, and a lot of congestion. I guess I have a cold. I didn’t really want to call (read: email) out of work, because it’s Friday, which meant I would be missing the weekly software meeting. This week the SW group was reviewing and discussing the Google C++ Style Guide as part of a recent effort to improve process and communication.
Also on the meeting’s docket was going over the first chapter of a book called Effective C++. The book is broken into 55 smaller “items”, each one dealing with a small and specific concept in C++. I was looking forward to what some people at the office have been calling “Book Club”, but, alas, too sick to work.
Maybe that’s not totally true–I could’ve popped some ibuprofen, driven to the office, and tried to stem the flow of nose-leakage for nine hours. But I really wanted to just stay in bed, and so I emailed my boss to give him the news. I rationalized this decision by acknowledging that even if I had gone to work, I probably would’ve been only slightly better than useless, and I would also run the risk of getting somebody else sick. If I were to infect a principal engineer with my cold, and he then had to take a sick day…well, that would be far more expensive for the company. So, you see, it was really in my employer’s best interest that I stayed home to
enjoy the amazing weathernurse a cold. -
Apr 4, 2013
Converting a QFrame to a QWidget
I had spent the better part of yesterday building, integrating, and testing a Qt form that was a single panel on a larger display. This morning I was tasked to “make it a popup” instead.
The back-end to the GUI was a C++ class that inherited a custom
SubFrame
object, which inherits Qt’sQFrame
object. My company also has a customPopup
class. Very similar toSubFrame
, thePopup
class, notably, inherits instead from aQWidget
.I made the appropriate edits to my source code so that
MyFormThing
inheritedPopup
instead ofSubFrame
. It didn’t build, though. ThesetupUi()
method in the Qt-generated Ui file expected aQFrame *
input parameter, but fromMyFormThing
I was passingthis
to the method—this
now being aQWidget *
. My GUI, as far as the .ui file went, was still aQFrame
. It needed to be aQWidget
.Simply casting the
QWidget
to aQFrame
won’t work, since aQWidget
is a not aQFrame
. This:ui->setupUi(dynamic_cast<QFrame *>(this));
will build, but it will not run very far—the messed up dynamic cast throws an exception and a core dump is born.
I knew I needed to change the .ui file, somehow, to make my
QFrame
aQWidget
. Qt Creator doesn’t, AFAIK, give the ability to do this kind of morph—at least not in version 1.3.1, which is what’s installed on our lab computers. And obviously I wasn’t going to rebuild the whole thing from scratch starting with aQWidget
base. Some quick Googling led me here.The .ui files in Qt are just XML. Near the top of the
MyFormThing.ui
file, I found this:<widget class="QFrame" name="MyFormThing">
<property name="frameShape"> <enum>QFrame::WinPanel</enum> </property>
<property name="frameShadow"> <enum>QFrame::Raised</enum> </property>
So I changed
class="QFrame"
toclass="QWidget"
, deleted the frame-specific properties, and rebuilt/ran without issue. When I inspected the GUI element in Qt Creator’s Form Designer, it said it was aQWidget
, so it looks like that worked.tl;dr Change a
QFrame
into aQWidget
by directly editing the XML in the .ui files.
Recent Posts
- Agentic git bisect
- MacWhisper
- Coding with agent helper scripts
- Vibecoding’s allure: the inventor and the fiend
- Philadelphia Data Explorer
- Plant identification
- Let’s Flip an Unfair Coin
- Flight Focus
- Generative AI Accelerates Our Exploration of the Search Space
- AI Assistant Use-Case: Performance Feedback