185 karma · joined May 16, 2020 (6y ago) · 47 submissions
comment 6y ago · link · parent
Foreign colonists in the Americas (ignoring any political aspect of this) faced disease, starvation and attacks from natives but still colonised America because of a dream they had.
comment 6y ago · link · parent
As I understand it a lot of the downstream ecological effects rely entirely on the fill rate the Ethiopians choose (3 years, 5 years, 10 years, 15 years, etc). A fast fill rate (5 years or less) could have significant short to medium term effects on the arable land downstream in Sudan and especially Egypt.
The dam is oversized for its power output (to ensure it can meet peak output demands during the wet seasons) and will operate as a fish trap, cutting the number of fish able to head downstream (and ultimately to the sea / mouth of the Nile) by a significant amount.
[1] https://en.wikipedia.org/wiki/Grand_Ethiopian_Renaissance_Da...
comment 6y ago · link · parent
Under the heading Requirements for Work Stations (Reg 3. and schedule):
24 Regulation 3 requires workstations to meet the requirements of the Schedule, (subject to the proviso outlined below), which sets out minimum requirements for the display screen, keyboard, desk, chair, work environment (including working space, lighting, reflection and glare, noise, heat and humidity), task requirements and software. Requirements are set out in fairly general terms, eg "The seat shall be adjustable in height". The Schedule does not contain technical detail.
Paragraph 32 states that anti-glare filters must be provided by workplaces which use DSE (display screen equipment) which are capable of projecting glare.
[1] https://www.hse.gov.uk/foi/internalops/ocs/200-299/oc202_1.h...
comment 6y ago · link · parent
I've seen through first hand experience how much paperwork there is in this setting (daily outcome charts, medicine administration records, abnormal behaviour records, dietary and fluid intake, etc) and how many clerical errors there are. I've also seen first hand the key-document-dependency there can be around service user files, communication notification booklets for staff, etc, where changes often happen synchronously and are forgotten because the document isn't available in the moment.
I've spent the last 4 months or so taking a sabbatical from working as a software engineer to work for £9.00/hour at a support home for people with mental and physical disabilities (think Down's syndrome or people who are unable to live in an independent setting). As a result I now know an awful lot about this setting, the people who work in this industry, the minimum feature set I would need and the legislative landscape these companies operate in.
The best way to find a profitable side project is to become familiar with a none-technical discipline which is direly in need of modernisation. If you don't want to take time out of work, then choose an industry (it could be tree felling, red-brick manufacturing, shale oil extraction or solar panel installation) and figure out what the problems are plaguing the companies, staff or end customers.
There are so many $1,000,000,000 companies out there just waiting to be founded in areas which are considered unsexy and don't involve yet-another-to-do-list application. Find one company, with one problem, fix the problem, there's your profitable side gig.
comment 6y ago · link · parent
comment 6y ago · link · parent
We did originally consider writing it in Rust (it would have been my personal preference) but the consensus was that since the rest of the tooling for this customer is in PHP we didn't want to add a skillset they didn't have internally if they were to move away from us in the future (we aren't big on needless vendor lock-in and prefer to compete on quality and service).
We experimented with PHP7.4 and Symfony / Laravel and found that we didn't have the performance leeway we needed, even with preloading / opcache.
We opted for Either Swoole or Phalcon, tried them both and found that Swoole was more to our liking and was somewhat more performant than Phalcon in our real-world testing.
We are exposing Swoole directly to them within their VPC, so we were able to do away with NGINX as a reverse proxy as well and have Swoole handle the HTTP request phase and HTTPS. We were able to make heavy use of Swoole\Table to save superfluous trips to Redis and run a Redis synchronisation process in a coroutine thread when the concurrent number of network tasks drops below 16.
Our end service response times (including network overhead) are around here:
- Mean response time: 4ms
- Fastest: 2ms
- 99th percentile: 9ms
- 999th permille: 10ms
One unforeseen side effect is that it has a crazy amount of scalability built in by default, the 8core machine the process runs on can easily scale up to 15,000 concurrent requests (as in 15,000 requests per second) without going over 15ms for response times, and can scale up to 45,000 concurrent requests before things start to "break".
comment 6y ago · link · parent
The end result has its own pros and cons:
* We don't get the brute-force security you get when millions of websites are running the same framework
* Our implementation is much faster (and there are many fewer memory leaks, as that was a core concern), as it only has the features we actually need.
* Without middleware layers for cross compatibility there are fewer abstractions, this allows the entire framework and application to be reasoned about with a lot less magic obfuscating the code which is actually running.
* If something is slow, it isn't an opaque problem of "symfony being slow", it's "@helldritch can you take a look at \App\Framework\DB\Query\JoinHydrationStrategy on line 112? If you unset the fields you no longer need, the hydration runs in linear time - much quicker when joining collections of Users against the Groups they're in)" <-- an actual message from our Discord.
* Each feature takes a little bit longer to develop (as the Framework needs the implementation before the application can use it)
comment 6y ago · link · parent
We found Phalcon to be a bit too opinionated in how to do things, and we fell in love with how Swoole has implemented Coroutines and (practically) free context switching between long running asynchronous processes and short running network requests.
Looking back, I do actually wish we had chosen Phalcon (the documentation is a lot better than Swoole's, which is lacklustre to say the least, and occasionally intersperses random characters in Simplified Chinese halfway through sentences), but we've been happy with Swoole's Table implementation which allows us to share memory between network request Coroutines and hit the Redis cache a whole lot less.
comment 6y ago · link · parent
We run and maintain several Symfony applications, we're very familiar with frameworks, how they work, their strengths and weaknesses.
This was a carefully considered route:
We wanted to be writing PHP code with high performance and strict response time requirements, as such:
* Symfony was instantly ruled out.
* We knew we would struggle to do this with raw PHP but didn't want to retrain the team to learn a new language (our thinking being we would likely write something inferior and insecure).
* We considered Phalcon and Swoole and ultimately decided on Swoole as we found Phalcon a bit too opinionated. That being said, Swoole's documentation isn't great so we've had to internally document it. (We will probably push a few documentation PRs for swoole-src when we're done).
* We didn't trust a big framework to have zero memory leaks, which is a key issue for long running Swoole processes, since it's not a typical issue for the single-use PHP processes we are used to.
With regards to documentation, it's very well documented (with documentation explaining the reasoning behind each class, usage, pitfalls and how it fits in to the larger application, and documentation for the wider ergonomics of the application, debugging, performance considerations, etc), with a 96% test php-unit coverage for the Framework.
Your concerns are very well received and are concerns we have had from the beginning. Constant vigilance and a deep respect for my co-workers is what keeps this little project on the straight and narrow.
comment 6y ago · link · parent
The code for the framework is its own composer library which is pulled in to the vendor directory, the code for the application sits within src/{BundleNamespace}.
If there's a service, it's a service, if there's a controller, it's in Controller, etc.
The aim is to maximise ergonomics and familiarity while minimising surprises. If a developer can pick up your microframework and be instantly writing code then you've done your job right.
comment 6y ago · link · parent
I had Sertraline 150mg previously and found that rather than helping me it caused a significant increase in my suicidal ideation.
I now take Mirtazapine 45mg instead and the suicidal ideation has gone away entirely, of course I have other side effects (the Mirtazapine makes me drowsy and has caused me start snoring!)
If you're reading this and your not getting a good response from your current medication, talk to your GP about changing to something else. Sertraline didn't work for me, but very well could for you, etc.
comment 6y ago · link · parent
I've recently started a new application in PHP which has very strict time / performance requirements. I could build it in another language, but I'm most familiar with PHP, the thing would take me 4x as long to build in Rust.
The default frameworks (Laravel and Symfony) are very slow out of the box, and doctrine / propel are pretty slow as well.
I've instead built something entirely brand new using Swoole and an assembled set of very fast and very light Composer packages (namely Fastroute and PHP-DI) and everything else I'm building myself (compromising on reusability and full-featuredness in return for raw performance).
I've split the code in to two: one half is the framework, it's concerned with routing, dependency injection, models and hydration, event handling and responses. The other half is focussed on the business concerns: creating users, creating authentication token, performing searches.
There were a few challenges: moving from single row, single model queries to hydrating complex joined collections was a major multi-day challenge, but the end result is that when a request has all the data it needs cached, it responds in ~3ms, when it needs something from the database it responds in ~10ms.
I was apprehensive when I started, and a half decade ago this codebase would be an unmaintainable mess, but I'm finding it a joy to work in: there are few layers of abstraction, not a single line of code is wasted, and when something goes wrong there's no magic obfuscating the true problem.
comment 6y ago · link · parent
Perhaps this is purely attributable to the British sense of irony.
comment 6y ago · link · parent
There's a long, detailed PDF about LTO produced by GCC which was useful in helping me to understand exactly how this works here: https://gcc.gnu.org/projects/lto/lto.pdf