The thread formerly known as "Weekend Coding"


I can type really really fast. Also, typing is not the bottleneck in coding. Thinking is. As long as I can type code changes faster than I can think of the next change, I’m as efficient as my brain can be.

How is this even possible? I completely understand automatically updating all the declarations and definitions. That saves a lot of typing to be sure, but the calls??? How the hell can it intelligently know what parameter to pass in every different place the function is called? If it can do that, it can just write your code for you. Yeah, it’s time consuming to go and check every place the function is called, but isn’t it sort of essential? I feel like I don’t want to even allow people to use that. A developer definitely has to go around and check each time the function is used to make sure it’s right.

20-30 minutes? What do you do when you press build, take a vacation?

I don’t know enough about your stack, so I’m sure you have reasons it’s done the way it is. Still, my first instinct is that it’s a bit backwards. I definitely don’t want to be tying up a developer’s computer for 20-30 minutes for them to go take a break in 2018. I would setup a remote mega powerful CI server of some kind to do the building and testing, preferably in under 5 minutes per build. Then I would setup a way to automatically, or at least easily, download those builds and run them locally for debugging.

I believe you, but I still feel like any software can be run locally.

I work on web software. In production its configured to run with a big stack of Amazon web services. How could I possibly run or test this locally without deploying it to AWS? Seems crazy, but I run the whole stack locally on a crappy old dell laptop.

Of course, it’s configured differently. For example I just use the local file system instead of Amazon S3. But due to lots of nice abstraction layers, my code is speaking to the same API regardless of what the environment configuration is. I can even theoretically test locally with sqlite and deploy to a production environment with Oracle. No code changes. Just flip an environment variable.

We could even switch to Azure or Google Cloud. Of course, it wouldn’t be that easy. The software would run after we change the configuration file, but it would still be a huge pain to bring all the data over and reconfigure the network.

Gotta abstract that stack.

EDIT: Are the long builds giving you time to post here? I only have time because I’m lazy.


Admittedly, while it tries to make an educated guess based on the type of the parameter (this is a C/C++ IDE, so typing can help here), its guesses aren’t always perfect and you still need to double-check. I typically consider the arguments it inserts as placeholders for the actual ones. Fortunately, it’s easy enough to get a list of everywhere that particular function was called so you can quickly go through and double-check. Sometimes it literally puts an obvious placeholder value that will result in a compiler error (usually if the type is a more complicated sort), which at least prevents the code from building if anything went wrong.

No, I visit this forum. :slight_smile:

Well, you can somewhat avoid that if you’re running something in a language that doesn’t need to be compiled, like Python. C++ is notorious for being slow to build.

That said, I don’t have to do a full rebuild from scratch often. I can usually just rebuild the files I modified and this usually takes a minute or two, tops.

I don’t work on web software, and that’s a big difference. I work on stuff that’s basically meant to run on customish (though built using stock x86 server parts) hardware. We managed to get it to run on a VM for dev testing, but real QA involves running it on actual hardware. Part of what I work on is a custom Linux file system kernel module and that alone is reason enough not to run it on your local workstation, lest a bug result in a kernel panic, total machine crash, and corrupted file system. VM snapshots are a life saver here.

In theory, it could be possible to run it locally, but in practice jumping through the hoops necessary means it’s easier just to deploy it to a VM of some sort, also running on local hardware (I have a separate box on my desk dedicated to running VMs). Plus, given that our product typically runs as part of a cluster, you’ll need to add some VMs to the setup anyway even if you ran it locally on your dev workstation. It also would result in not running on a base operating system identical to what the customer would be running on the actual hardware. It gets trickier since we often have different releases running different base OS versions, and it’s much easier to flip OS versions around on a VM than on a dev box you expect work on when you need to change gears.

Eeyup, like I said before, but only partially. Not all those builds are super-long, and sometimes I come here because I need a break.


Still sounds like you could still use a separate build server to save some time.


The compiler is already figuring out that these calls all map to the same function. I wonder if the IDE is outsourcing to the compiler, has its own parser, or is doing something like ctags. Anyway, after the edits, the compiler will tell you if you broke something obvious.


I feel like “debugger” was a point that was glossed over early and has not come back up. I don’t always use an IDE, but when I do it’s for the debugger.


I’m trying to think of an example since I usually try to avoid changing function definitions in a way that isn’t backwards compatible. Also, since I mostly use Python, I’m very rarely forced to do so.


I did just say this a few posts ago.


We probably could at some point. At a previous job we had an entire build cluster to do builds of our system, which was of a similar nature.

Pretty much a combination of all of the above, though I’m not sure which components do what. It uses Clang to do a lot of that heavy lifting since the Clang toolchain includes libraries (libtooling, libclang) and language servers that allow it to provide compilation/parsing/etc. services to editors and other tools.

I probably would if I could do remote debugging more easily too. Sometimes it’s just easier to use command-line GDB however. Plus I’m so used to it at this point that I’m pretty comfy with its CLI.

Edit: links to libtooling and libclang

int add_two_numbers(int a, int b){

ok got a function

int add(int a, int b){

Ok, it should be able to rename every place the function got called. No problem.

int add(int b, int c){

Ok, it shouldn’t really have to change anything, cool, cool.

int add(int a, int b, int c){

Alright, WTF is it going to do about this? Is it smart enough to change

add(1, 5)


add(1, 5, 0)



Yes, yes it is.


Yeah, this is part of the glossing-over I was talking about. You mentioned it in passing while making a point about the terminal being better for all the IDE’s non-editor features. But to me it seems huge; worth much more than a passing acknowledgement.


But how does it know? What if it’s

int multiply(int a, int b){

int multiply(int a, int b, int c){

Let’s see you put a 0 in that third slot now!

int divide(int a, int b, int c){

I gotcha now IDE boi! Think you’re so smart, but now you just divided yourself by zero.


I mean yeah, Visual Studio debugger might be excellent, or at least it was the last time I used it. But CLI debuggers are all still really good. Not going to sacrifice every other aspect of development just to get that little bonus there. Also not going to pay an arm and a leg to get Visual Studio when open source debuggers are free.


Sure, pdb and gdb are great for Python and C/C++ respectively, but the Android Studio debugger is essential for any complex Android development.


Pretty sure you can’t do any Android development at all without Android Studio, which was such a night mare that I uninstalled it in less than an hour after trying it. That was a few years ago, though.


And that’s why you need to double-check the placeholder values it uses, as I stated before.

Although, if you’re doing something silly like renaming a multiply() function to a divide() function, you’re potentially breaking so much other code in your project that your IDE is the least of your worries here.

Edit: Visual Studio is free now too and has been for several years.


Ah, so all it does is throw in a hard-coded placeholder value? No other kinda magic like figuring out a local variable to throw in?


It has improved…somewhat. And it is logically possible to do Android development with vim + a terminal emulator, but it’s better with Android Studio despite all the sources of friction.


The real real one? Not like, community edition or lite edition or whatev?


It depends. If it’s an enum, it’ll put in one of the enum values instead of an arbitary 0 value or something like that.