Friday, 31 January 2020

Thinking about (programers) thinking.


One of the hardest things to do is understand how others think but failure to see and understand the worldview from another persons viewpoint can give rise to unreconcilable conflict. Seeking first to understand how others think can also enhance ones own worldview. This article will delve into four different ways thinking used by programers and other technology specialists in the construction of software solutions. Understanding these different modes will provide insight into "programmers thinking".

Iteration

Step by step from the start to the finish. One item taken at at time in a predictable order. Most often seen in the processing of lists and tables.
Look for phrases like  "for ( i=5; i<20; i++ ) { B[i] += 20 }"

Iteration provides the most basic way of processing items in sequential order. Usually performed one at a time iteration is the most common form of relating the same operation on different items.  Programmers will understand that the above loop have all the iterations executed in parallel but the following loop can not be safely executed in parallel.

 "for ( i=5; i<20; i++ ) { B[i] += B[i-5] }"

Recursion

Best understood as room by room approach. Think of working though a mansion house using these instructions
1a) Enter a room.
1b) Process the current room.
2) Find the doors list for the current room - if list not found then make a list of the doors in this room with the door you came in highlighted and crossed off. Leave door list in room.
3a) Pick an unprocessed door from the room's door list, cross that unprocessed door off and exit via that door.
3b) if the list of doors in this room is finished then exit out the most recent entry door highlighted on the rooms door list.
4) If there are no doors in the room then you are in an oubliette and will have to wait for Hoggle to help you out the Labyrinth.

Recursion is most often seen in the processing of branched trees of information.

Look for procedures that call themselves where inside the definition of treewalk a call is made to treewalk. Look for a structure like "Define Treewalk ( node ) { process_this_node ; Treewalk ( left ) ; Treewalk ( right )  } "

Recursion requires an exit point for closure.

Object Orientation

This way of thinking binds together the processing instructions and information to be processed. Make a data object then ask the object about itself or tell the object to do something to itself. Objects can be grouped into related families that inherit behaviours and attributes. For example: An object Animal is defined with attributes of name, species, habitat, colour.  An object of that class is made "Instantiated" for Cat with attributes Speedy, Manx, domestic home and ginger. Another object is made for Goldfish with Goldie, shubunkin, domestic tank and gold. Within the object definition the logic for how the objects interact is created so that Result of Cat + Goldfish has a meaningful outcome.
Look for references to the object "self.".

Propositional Logic

Describe the problem by dissembling the internal problem into the smallest possible phrases that together describe the whole problem. Propositional logic is a pathway to a solution, a way that multiple problems can be re-presented for solution by a single logic solver.
Look for references to "assert" followed by a definition.  See Solving-classic-sudoku-using-using-smt for a worked example.

Further reading about the different way of thinking and personalities in the IT and cyber world.

** Update May 2020 

Check out this Wired read that really nails the hacker psych and how it turns bad.

Wednesday, 29 January 2020

Investments make you rich but fees make you poorer.


Consider the following table that shows return and costs of investment plans. For various size pots along the top, with various % returns down the side, Income per month is shown.

For example £100,000 generating 3% return will give £250 per month.




However most investment platforms charge fees PerAnnum that can vary from 1.5% down to 0.2% of the capital held in the investment. When this fee is deducted from the income generated the net value delivered can be seen in the orange lines at the base of the table.

For Example for a £100,000 pot generating 3% return could pay from £1,850 year when the fees are 1.15% or pay £2,800 when fees are set at 0.2%.  The key point here is the fees are charged as a % of the total pot invested and not as a proportion of the value generated.  Given the same example paying 10% of the value generated as the fee would still provide £2,700 outcome.

When calculated as a proportion of the value generated the fees charged can easily amount to as much as 1/2 of the value generated by the investments.  For example investments returning 3% PA but paying 1.15% fees loose more than 1/3 of the returned value.

The costs of fees are compounded over the term of the investments. Money taken in fees is not available to accumulate in the later years of the investment. This has a big impact on the final value. For example over 10 years our £100,000 pot generating 3% returns delivers £134,391 with no fees,  £131,804.78 with 0.2% fees or just £120,118.62 in a 1.15% fee structure. The difference between 0.2% fees and 0.15% fees is over £11,000.

Studies have show that there is little relationship between the level of fees charged by advisors and the generated returns. In the short and long term, going for lower fees and ongoing costs, is a better strategy than trusting high fee charging advisors.

PS: Just swap the £ for your local currency symbol if required - the numbers are the same.


Friday, 10 January 2020

"Looks like the thing but is not the thing" aka avoid the offshore supplier trap

Avoid the offshore supplier trap.

With the development of internet global market places we often purchase goods from abroad without being aware of the potential problems. The consumer law which applies to a transaction should be the consumer law of the country in which the products are provided. However often such consumer laws are ignored or negated by offshore supplier using a range of devious tactics. This has resulted in the “Offshore supplier trap” which has become widespread defrauding consumers of millions each year. 


Here's how it works 

  • Some desirable product is advertised with glowing description and fantastic photo.
  • Promises are made of easy returns and guarantees of fitness for purpose.
  • Product is ordered from supplier and paid for by card in your own currency.
  • Goods arrive, in a few days or a week or so, packaged from an offshore location.
  • Goods are rubbish either not as described, shoddily made or just broken on arrival. Problems with purity, manufacturing quality are evident. Particular problems exist with small electronic goods being unsafe, untested but marked as tested or a knock off of a branded item.
  • They  “Looks like the thing but is not the thing”. 
  • When contacting supplier they respond with either: 
    "We can do a partial 10 or 20 % refund in exchange for acceptance."
    or
    "You can send the products back at your expense to the offshore location."

As the kicker:

  •     The promised refund is less than agreed,
  •     Cost of sending goods back is more than goods are worth,
  •     Goods magically never arrive at return point - refund is declined.
  •     Company working offshore pays no vat or taxes and employs cheep labour at exploitative wages.

Variations:

  • A free sample is offered with a just "pay for postage" agreement. Subsequent high charges are then applied to the same payment method using the excuse “See the T&Cs you joined our club with a monthly fee."
  • Payment details and contact details are passed to organised criminal gangs of spammers and fraudsters. 
  • Delays in processing and replying push the transaction past the payment platforms instant refund time limit.

Avoidance strategies

  • Buy through a trusted platform with a uniform published in country returns policy.
  • Check supplier with a few Google searches “Supplier name problems” or “Supplier name reviews” or “Product name reviews"
  • Look on consumer feedback services such as Trust pilot or Amazon or Reviews.io
  • Look carefully at the product reviews  - are they relevant ? Are they from confirmed purchasers
  • Look for the business address - is it local, in country and usable for returns.

See also