39 karma · joined May 6, 2011 (15y ago) · 25 submissions
comment 7y ago · link · parent
I arrived with effectively no real PERL knowledge but a high level of Linux sysadmin competency
I hugely enjoyed working with the system. It was productive, flexible, and never gave me unexplained errors.
Even scripting on the perl api was an excellent experience.
Moreover the devs were extremely helpful in their irc channel (circa 2014-2016 at least) and walked me through a manual upgrade caused by the previous admin customizing the database schema in an unsafe way
Would highly recommend
comment 7y ago · link · parent
By mocking mymodule.os.listdir you add a requirement that mymodule actually import the os module and take advantage of mock.patch failing loudly if it does not.
comment 7y ago · link · parent
For the most part I can get by with one rule: always mock the module.
with mock.patch('os.listdir'):
will always work, even if it doesn't accomplish what you want. with mock.patch('mymodule.os.listdir')
will fail if that module does not explicitly import os and instead does something like from os import listdir (perhaps because a later dev did not realize importing os directly was actually a requirement for the test and changed the code).The rule is not perfect though. In the above case, the error will actually be
ImportError: No module named os
This can be fixed with e.g., assert hasattr(module, 'os'), "os module is not explicitly imported"
as a preamble to your test but ... it is not perfect by any means.EDIT: formatting
comment 7y ago · link · parent
For less common hardware the situation is just as bad. Agriculture equipment has been a pain point for many to get repaired, as the parts are much harder to find and the limited number of certified repair shops can be pressured to stop servicing equipment deemed end of life by the manufacturer
comment 7y ago · link · parent
For the uninitiated this basically cranked your ability to uninstall windows components up to 11, allowing you to strip out IE and and get windows humming along quite well on antiquated hardware.
comment 9y ago · link · parent
Then, using the same analytical skills, students are better prepared to analyze other systems (eg security) and pinpoint/exploit their weakness
comment 11y ago · link · parent
> Some say that because we write slower than we type, it allows for deeper thinking as opposed to faster thinking, which could be beneficial. Since writing takes longer, I tend to mull over what I'm trying to communicate and condense it. This is likely why I remember it better. However ....
> because it's harder to edit one is more careful while writing Absolutely not! Given a half pages written text I would likely have no less than a dozen clear markups where I revised or edited a thought.
I certainly don't want to write everything, or produce professional quality hand-written text, but I find benefit in actually writing things down
comment 14y ago · link · parent
If you pick a solution and run into a tiny annoyance learn to work around it in some way. It is a tiny annoyance.
Best case scenario, learn why it's happening, how you can fix it, and (in a dreamland) submit a patch that fixes this for everyone else in the future.
Worst-case scenario just find a workaround.
comment 15y ago · link · parent
E.g., urllib/urllib2 both support urlopen(url, [data]) if `data` is supplied the request is executed as a POST, if not it is executed as a GET.
Issuing a GET w/ a querystring requires mutating the `url` and omitting `data`. This surprised me at first, and probably a number of others
comment 15y ago · link · parent
AFAIK everyone agrees that Mac hardware can be gotten cheaper by not buying it inside a Mac. Why not assemble a PC, install a VM, and then run windows-in-windows?
This is all coming from someone who exclusively programs on linux boxes, so maybe I'm missing something?