Friday, May 4, 2018
Am I through with the MVC architecture already?
For 8 months at one client I worked on several customer-facing web assets for them. Among them was a relatively new SPA (Single Page Application) to handle Help and Support, written in AngularJS.
I have written my own Apex applications, and the development process is highly iterative (as is required by XP and any agile process developed since). You can either start off with an angular-seed or ng-boilerplate The angular seed repo needs to be updated to the version of Angular you want it to use, and if you plan to refer to docs.angularjs.org, make sure that is set to the same version as your project.
Once you have got it running you can start to implement your routes, scopes and directives, adding Karma or Protractor tests and building features in, one card at a time, until you're done.
The key piece of advice for coding with AngularJS is NOT to use jQuery because when you start introducing jQuery it interferes with the AngularJS stuff. Actually remove the reference to jQuery if you can't resist the temptation to use the dollar sign.
http://www.cheatography.com/proloser/cheat-sheets/angularjs/
I've never really liked the result. Unless you were directly involved in the production process, you have very few clues about what is going on inside. It's often difficult to maintain and adding new features often creates bugs. Often you are not sure whether you are looking at a bug or a business rule. I did not enjoy making changes to the code because I felt as if I was doing as much harm as good, probably more.
This brilliant paper on DCI shows how the MVC architecture is an advance on the OOP paradigm (and goes on to argue that it doesn't really work).
People at Facebook (who have a lot of experience in this area) explain why MVC doesn't scale and they go on to explain a brilliant way forwards: a framework called FLUX and a user interface library called REACT.
The key concept from React is the "virtual DOM abstraction" a sequence of messages (for example [{Alice : online}, {Bob: offline}, {Charles: online, mobile}]) describe mutations to a mode (the virtual DOM), React will diff the virtual DOM and the real DOM and work out the minimal set of DOM mutations needed to transform the DOM to match, and put them in a queue. A batch update will set the DOM to match the virtual DOM.
You will need your wireframes, to document your Use Cases, and to produce State Transition Diagrams.
https://facebook.github.io/react/docs/getting-started.html
http://www.cheatography.com/kitallis/cheat-sheets/reactjs/
Frontal identification on motorcycles
Your Honour,
I write to you with reference to your call for frontal identification on motorcycles (i.e. front numberplates). I also would like to 'level the playing field' as you say. The real problem is we live in a car-centric world, and that is the cause of a number of safety issues with motorcycles. I will list 5:
I write to you with reference to your call for frontal identification on motorcycles (i.e. front numberplates). I also would like to 'level the playing field' as you say. The real problem is we live in a car-centric world, and that is the cause of a number of safety issues with motorcycles. I will list 5:
- Speed cameras face the front of the vehicle (but every ADR-compliant vehicle has a rear numberplate). The camera systems with forward only facing cameras were developed, installed, tested and commissioned by car drivers. EITHER at no time did anybody think about motorcycles OR motorcycles were considered to be a small percentage of vehicles that were not worth bothering with when considering the number of extra requirements and tests in comparison to the extra number of tickets issued. Whatever the reason, there aren't many mobile camera systems on the market that capture rear plates. I believe the vast majority of fixed cameras identify vehicles by their rear plates and mobile safety cameras monitor traffic traveling in both directions.
BUT this is only one symptom of the problem (we live in a
car-centric world). The interesting thing is that speed cameras are
not the only piece of regulatory framework for motorcycles to have fallen
through:
My point is, rather than calling for a ad-hoc fix to the specific problem of lack of frontal identification on motorcycles, you would get better results — and make the world a better place — by fixing the root cause: consider motorcycles when systems are designed in the first place.
I invite you to join with me in calling upon VicRoads to engage with all sectors of the PTW community
- Inductive-loop traffic detectors do not reliably detect motorcycles. These generally occupy 50% of the width of the lane and are placed centrally in the lane. Motorcycles are supposed to ride in either the left-hand or right-hand wheel track of the car in front, so we can pass outside the loop easily, depending on whether or not we want to trigger it. Some road-going sports bikes are almost entirely alloy, carbon fibre, and plastic — they wouldn't trigger the inductive loop if they rolled right over the top. Sometimes I am unable to trigger the automatic barrier going into a car park, or I may be able to run a red light without being photographed (I have never tried this, but I certainly move to the lane extremity on amber!). This means red light cameras can be avoided by motorcycles too. At least with speed cameras the Road Safety Camera operators can see the motorcycle with no rear plate; this situation is worse because the system is so dependent upon technology, which has a built-in faulty assumption that the vehicle in question is a car, it is likely you don't know how many motorcycles run red lights. You may even believe it is not a problem!
- Crash barriers are not designed to be hit by motorcycles. AS/NZS 3845 dictates crash barriers will be tested with cars and trucks only, not motorcycles; the vehicle category doesn't exist in the standard. It is known that the reasoning above applied with crash barriers (motorcycles were a small percentage of road vehicles and not worth bothering with when the standards were first drawn up) hence crash barriers are dangerous to motorcycles because they were never even designed to be hit by motorcycles. In 2012 the standards were revised. I personally called for motorcycles to be included at that time. AND...I am still waiting for the standards to be published so I can see whether I have had any effect.
- Car crash testing: generally speaking, there are eight different types of car crash test performed world-wide. None of them involve collisions with motorcycles. In Australia, ANCAP (Australian New Car Assessment Program) runs four different types of crash test: front impact, side impact, pedestrian and pole.
- Roadside furniture: specifically wooden posts (don't know their proper name) that are always placed between the road and footpath on a corner at EXACTLY the point a motorcycle would leave the road.
My point is, rather than calling for a ad-hoc fix to the specific problem of lack of frontal identification on motorcycles, you would get better results — and make the world a better place — by fixing the root cause: consider motorcycles when systems are designed in the first place.
I invite you to join with me in calling upon VicRoads to engage with all sectors of the PTW community
Subscribe to:
Posts (Atom)