Random things #9

Written on 22 March 2015, 10:48am

Tagged with: , , , , , ,

1. Aspect oriented programming (AOP)

In the wikipedia example about AOP, transactions, security and logging represent cross-cutting concerns. If we need to change one of these (ex. security) – then it will be a major effort, since the concerns are tangled and the related methods appear scattered around all the code.

AOP attempts to solve this problem by allowing to express cross-cutting concerns in stand-alone modules called aspects. Aspects can contain
advice – code joined to specified points in the program and
inter-type declarations – structural members added to other classes.

Drawbacks: If a programmer makes a logical mistake in expressing crosscutting, it can lead to widespread program failure.
Conversely, another programmer may change the join points in a program in ways that the aspect writer did not anticipate, with unforeseen consequences.

2. HTTPS and MTU Path discovery

I recently encountered this interesting problem with HTTPS and MTU. It is explained entirely by Mark Maunder – ‘Routers treat HTTPS and HTTP traffic differently‘. I will just summarize it:
– HTTPS servers set the ‘Do not fragment’ IP flag
– if a server sends a big HTTPS packet and a router does not allow that packet size, then the router will not break that packet (see previous point).
– so the router will simply drop the packet and send back an ICMP (Internet Control Message Protocol) message telling the host to reduce the MTU size and resend the packet
– but if the network administrator decided to block all the ICMP traffic, then the host will never see the problem
– the solution in my case was to decrease the MTU size (1400)

The same issue described also here.

3. Information security standards

(more…)

Random links #4

Written on 23 September 2014, 04:42pm

Tagged with: , , , ,

1. 5 Unix Commands I wish Iā€™d discovered earlier. Ok, mainly talking about xxd

2. The Birthday problem: in a class of 30 students, probability that today is an anniversary: 8%. Probability that 2 students have the same birthday: 70% http://en.wikipedia.org/wiki/Birthday_attack

3. ColdFusion Developers, switch to Sublime Text! I already did it, years ago.

4. Top 9 IT security certifications. In case you need one.

5. He was asked to crack a program as part of a job interview. Twice šŸ™‚

6. He quit his job. It was the biggest mistake ever

Assorted pills
Photo: istockphoto