« first day (2220 days earlier)      last day (2777 days later) » 

3:44 AM
I was a lot more productive today than I am usually comfortable being. I really churned out the code over the past couple of days, today especially.
Actually, a net minus, but it was a lot of changes.
(net minus lines of code)
 
And this is exactly why I hate all books, formulas, and managers that cite 'lines of code' as any kind of measure of anything but a pain in my butt.
 
It was some overdue cleanup. I was afraid to touch it because it's threaded and I sold my boss on it being threaded, and then I concluded we needed to make it single-threaded. You gotta make the hard decisions, you know.
 
Eeew, test the hell out of it then.
 
hard to test, but yeah I improved the coverage numbers quite a bit. It's all side-effecty because it wraps a black-box SDK.
and to make it worse, when tests run in production, the SDK doesn't work, so I have to mock the thing. That's why I was able to answer that Python question on mocking a package or module or whatever.
(you just make the module a magic-mock in sys.modules before it's imported, one per submodule)
But luckily the processing is very straightforward, and I was able to just make the methods call the processing functions directly instead of adding the objects to the consumer thread's queue.
 
 
9 hours later…
12:34 PM
@enderland well if you liked that, then here's a bunch of arrogant wankers pontificating on the subject further... news.ycombinator.com/item?id=219425 (there but for the grace of God go I)
> (Incidentally, Yegge has probably done more to advance the art of speed-reading among programmers than any other single individual. Not that there's anything wrong with that.)
I did say "don't spend all day on it"
 
 
2 hours later…
2:56 PM
> There are a lot of MS (and even some PhD) students in CS departments who are just looking to increase their base salary.
Well, what the hell is wrong with that?
 
@AaronHall speaking of coverage, which tools do you use for Python? I'm aware coverage.py exists which has integrations with various test frameworks, but it only gives statement coverage + a very restricted kind of branch coverage. Do you know of any non-proprietary alternatives?
 
3:53 PM
I'm pretty sure that's what we use, though we have lots of customization built on top of it.
It's really quite nice.
 
4:06 PM
Hmm. Thanks anyway.
 
4:47 PM
@amon what's the criticism of coverage.py?
 
My knee-jerk reaction is to migrate this to programmers. However, it is not a Tuesday. — Mr Lister 44 secs ago
 
 
2 hours later…
6:30 PM
@AaronHall My criticism is that it operates on a per-statement level, and only considers control flow between statements. An expression f() if cond() else g()? Is always reported as having full branch coverage. The same for short-circuiting operators f() and g(), f() or g(), if-clauses in generator expressions, and multiple comparisons f() < g() < h().
This is useless for finding uncovered code, unless you assign intermediate results to variables, only use statement-level conditionals, and avoid short-circuiting behaviour. At that point, I'm just writing Python-flavoured assembly.
Of course, I've probably been spoiled by Perl, where the Devel::Cover tool does calculate coverage for all branches, including those within statements (but Perl doesn't make as big a deal about statements as Python to begin with).
When I gathered test coverage on C++ code, I had the opposite problem: lcov/gcovr calculates branch coverage based on the assembly code, but most of such branches do not correspond directly to anything in the source code.
 
7:00 PM
@amon the ternary would be considered covered, but if the cond() returns True for all your tests, and g is not used elsewhere, then the body of g would be considered uncovered. It's not perfect, but it's something. I'm sure Ned would love to get a patch that improves the granularity. I'm not sure how, though. AST parsing?
 
7:30 PM
Coverage.py already uses some kind of AST analysis to understand the control flow. The source is unexpectedly rather readable! However, a patch would be beyond my abilities unless I put more skill points into “Python internals”.
 
8:14 PM
Level up!
 
9:06 PM
This site is intended for specific programming questions. You might find better luck at the Programmers Stack Exchange site, which deals with other aspects of professional or hobbyist programming. — Aasmund Eldhuset 9 secs ago
 
9:20 PM
@AasmundEldhuset programmers.SE does not accept community wiki questions. We are not your trashcan. Please see our how to ask a good question and on-topic pages. Consider that and link to them when referring people there. We get enough lost people as it is. — CandiedOrange 16 secs ago
 
 
1 hour later…
10:26 PM
@AaronHall I think it's insightful, anyways
even if you don't fully buy into his sort of elitist perspective
@AaronHall I can already read really, really fast ;-) really helpful online even ignoring skimming
 
I don't think I will ever be that sort of level of good
but I don't have to, realistically
 
I want to be there and reclass into management.
I've just got to figure out what the equivalence to Baal runs are and keep leveling up. I think if I keep giving educational talks on new subjects that grow me, that will help.
 
 
1 hour later…
11:35 PM
This question is off-topic according to the site's help pages. But you get productive by setting goals and getting them done, then improving on them. Toy compilers - nope. Podcasts, no idea, kinda a time-sink, I'd rather read, it's faster and more skimable. Hangout? Chat and IRC, probably. Mentor? Meetups or clubs maybe? I just had a productive week that was net fewer lines of code than when I started. Personal time? I'd say I have a lot of personal time, but I spend a lot of it at programming meetups helping others learn, so I keep growing too. — Aaron Hall 1 min ago
 

« first day (2220 days earlier)      last day (2777 days later) »