Archive for the ‘Technical’ Category

Personal – 13 Apr 2013

Friday, April 12th, 2013

- My partner, Colette, and I are wrapping up four months in Wellington, New Zealand, this weekend and preparing to spend two weeks touring New Zealand’s North Island by car before we travel across the Cook Strait via ferry to the South island and then by train back to Christchurch.

- I’ve really conceived a love for Wellington.  What a vibrant, beautiful and pleasant a city it is.  We’ve been over most of it on foot and by bus these four months.  We’ve sat in on Parliament’s question and answer sessions, visited endless coffee shops and restaurants, hosted a few friends with us, made use of the libraries, theaters, free concerts, talks and various cultural and ethnic street events.

- Another event that transpired during our time here was that Colette wrapped up 12 years with the New Zealand Ministry of Justice and is now a free agent.

- And yet another event was that it looks like I will finally be paid out for the apartment I lost in Christchurch in the February 2011 earthquake there.  And that money, when it arrives, will augment my income nicely and give me a bit more flexibility which is never a bad thing.

- While I’ve been here I’ve been digging into programming iPhone and iPad apps and I’ve come up to speed nicely.  In fact, just today, I bid my first job to write an app.

- That’s the news.

- Cheers from New Zealand, my friends,

-dennis

 

How to implement Globals in Objective-C – Updated

Monday, February 18th, 2013

- Oh, the embarrassment of premature technical wisdom ejaculation.

- Since I wrote all the stuff, below, I’ve had a big rethink about Globals and realized that the method of implementing them that I’d adopted was seriouly lame.

- I went back and thought through how I’d done it before in the Microsoft Win32 OOP world and I reasoned my way through to doing the same thing here, and, it is sooooo much simpler and way faster.  That’s what I get for cook-booking off someone else’s code without understanding it.

- It still baffles me, when you go searching for it, why the information out there about how to implement Globals in Objective-C is such a dog’s breakfast.

- But, I know how to do it now and I’m going to write it up here and maybe that will aid someone else on a search to answer the same question.

- So, below, you will find my new method and code and the old stuff is gone.

-dennis

*—————————————————–*

Create a class, UtlGen.  In it we put general utility methods that we can call from anywhere.

Create a file, globals.h, where we can declare our globals variables.  In it I have the following line:

UtlGen * g_pUtl;

This creates a pointer to an instance of the UtlGen class.

I want this pointer to be (globally) visible from anywhere in my program so I need to place it outside of any blocks.  I’d also like to put in a place that makes sense to other programmers.  To me, there are two obvious choices.  One is in the main.m file and the other is in the AppDelegate.m file.  Main.m is the first place where execution begin and the AppDelegate.m is the second.   I select the AppDelegate.m file because I think folks don’t generally expect you to mess with the main.m file.

Near the top of the AppDelegate.m file, I import the global.h file like so:

#import “myprogramAppDelegate.h”
#import “global.h”   <— global variables live here.
@implementation myprogramAppDelegate

We also instantiate and release the UtlGen object in the AppDelegate. module.   The very first method called in AppDelegate.m is:

-(BOOL) application( … and so on …

Inside this method, we add the line:

g_pUtl = [[UtlGen alloc] init]; 

This is how we instantiate the UtlGen object and assign its pointer to the global variable, g_pUtl.

In the -(void) dealloc method of the AppDelegate module, we add the following line:

[UtlGen release];

And that’s how we release the object’s memory when the app shuts down.

In the myprogram-Prefix.pch file, I place the following line in with the other imports:

#import “UtlGen.h”

This file contains the precompiled definitions that are visible to all modules.  Importing UtlGen.h here means that the methods (and their prototypes) available in the UtlGen object will be visible everywhere.

Now, we are ready to use any of the methods in the UtlGen object from any module.

Let’s use a hypothetical method called ‘twiceMe’ in the UtlGen object.

In the application, we have a class, someClass, which is implemented in the someClass.m file.  In this file is the implementation of a method, ‘doMath’.  In the doMath method, we will call the twiceMe method of the UtlGen object to double the value of an integer we pass to it.

In the someClass.m file we do this:

@implementation someClass
extern UtlGen * g_pUtl;

-(void) doMath
{
int n = [g_pUtl twiceMe:2];

The extern tells the compiler that the g_pUtl variable has been defined elsewhere (over in AppDelegate, remember?).  In doMath, we call the twiceMe property of the UtlGen object and pass it a ’2′ and it returns a ’4′ to us which we place into ‘n’.

That’s it.

 *——————————————————*

A Tale of Two Internets

Friday, February 15th, 2013

- I worked for a company up until a year ago that was heavily involved in e-Commerce.  They are a great group of people and I doubt that any of them would see themselves as adding to the world’s inequalities.  

- But as they say, “No single rain drop see itself as responsible for the flood.

- But they, like all such e-Commerce facilitators, are striving to develop the technology to ‘read’ the customer more and more.  And the quote, below, shows where some of this is going.  And it might not be pretty.

- dennis

= = = = = = = = = = = = = = = = = = = =

“For the past decade, e-commerce sites have altered prices based on your Web habits and personal attributes. What is your geography and your past buying history? How did you arrive at the e-commerce site? What time of day are you visiting? An entire literature has emerged on the ethics, legality and economic promise of pricing optimization. And the field is advancing quickly: last September, Google received a patent on technology that lets a company dynamically price electronic content. For instance, it can push the base price of an e-book up if it determines you are more likely to buy that particular item than an average user; conversely, it can adjust the price down as an incentive if you are judged less likely to purchase. And you won’t even know you are paying more than others for the exact same item.”

- To the original article in Scientific American: :arrow:

New tech – hotspots

Monday, August 27th, 2012

I encountered a very cool technology today.   A cellular hot-spot.    

This is a cell phone that can access the Internet via the cellular system and which then rebroadcasts the Internet access to other devices around itself via WiFi.

In the case I’ve found, it is an Android HTC  phone, tethered to the T-Mobile network here in the U.S.   The app itself is called “Hot-Spot” and it came with the HTC Android phone.

I’m told that cell providers like AT&T and T-Mobile here in the U.S. are not enthusiastic about the “Hot-Spot” concept and they are working out how to either block folks from sharing their signal or to charge them for the extra devices accessing the Internet via the hotspot.

There are also free-lance apps around (not from the cell phone maker) that can do this but I’ve read that these can be buggy.  One such is “MyWi”.

If you know more about all of this or have corrections to what I’ve posted here, let me know.

Dennis

The greedy are everywhere…

Wednesday, July 4th, 2012

- In the U.S., in Europe, and even here in my beloved New Zealand.

- They put on suits, they carry a briefcase, they do ‘deals’ and it all looks brilliant and magical.

- But, sometimes, someone goes behind the scenes and traces some of this ‘business’ and finds that a lot of it is ‘funny business’.

- What would you think of an investment company that did big deals for the purpose of making profits for their investors and, when the dust had settled, the deals were done and all the contracts and the fine print were all read out and traced – you found out that the bankers and the company’s principals made far more profit from all of the money shuffling than any of their poor investors did?

- I think it stinks.   And yet I also think that many business types live and thrive in just this way and consider themselves brilliant,.  And that they consider the rest of us as just their sheep in need of a shearing and too dumb to know we’re being hard done by.

- This bit of fun happened here in New Zealand though the business itself reached around the globe to London as well.  

- No matter.  In fact, all the better.   The more abstract, the further afield, the less normal people can relate to the doings, the better.   Big money moving in the shadows.

- Here in New Zealand, the National Government, under John Key, a former Wall Street type, wants to sell public assets to raise money.   After reading this expose on the investment company, EPIC, I’ll be most curious to  ’follow the money’ when the Key government does begin to sell those assets.  

- Who will be doing the deals and who will be making enormous profits from the fees along they way?  Why do I suspect that they will be business types like Key?  Types who are telling themsleves all along the way that the fact that they are getting rich is only incidental to the good they are doing for the country.

- Yeah, right.

- Dennis

- – - – - – - – - – - – - – -

The rather curious case of Epic’s fee payments

(this from stuff.co.nz an opinion piece by Tim Hunter)

OPINION: After years of study, there is growing acceptance that homo sapiens has evolved into two distinct branches. One comprises the vast bulk of humanity, the other comprises individuals known as bankers.

Although superficially alike, the latter can be distinguished by their skin, which is thicker than normal. It also has special properties giving unusual adhesion to most forms of money.

In tests using a drained swimming pool filled with Zimbabwean currency, bankers were found to emerge from the pool with up to 25 per cent more cash sticking to them than the non-banking control group.

Scientists initially hypothesised an epidermal layer of tiny hooks, like Velcro, to explain the effect, but now favour a theory of electro-magnetic attraction at the cellular level.

Edinburgh University’s department of parapsychology is also testing observations that bankers can detect the contents of a wallet within a range of about five metres, even through stud walls.

These attributes are an advantage in financial transactions, and Chalkie reckons there could be something like this going on in an investment structure called Equity Partners Infrastructure Company (Epic). Basically, Chalkie’s study of accounts and documents with small print suggests Epic has paid out millions more in fees to bankers and their ilk than it has to its investors.

- Definitely, you should read more here… :arrow:

Scrap heap may be last stop for secret slice of Navy history

Monday, April 30th, 2012

- An interesting bit of U.S. Naval history.  It’s hard to imagine all the secret projects that are carried out that we’ll never hear anything about.   Here’s one which the curtains, finally, have been taken down on so we can see what was done.  

- I’m not much for military stuff but I admit I found this fascinating and spent a long time poring through the interior shots of this one-of-a-kind ship.

- Dennis

= = = = = = = = = = = =

A secret chapter in American naval research could soon reach an ignoble close when a rusty barge and its once-classified contents leaveSuisun Bay for the scrap heap.

Slipping through the sea like a black mirage on catamaran legs, the 164-foot Sea Shadow looks like something Darth Vader might fly. It is the world’s only ship built to be invisible, assembled secretly in Redwood City in 1985 by the U.S. Navy and contractor Lockheed Martin at an estimated cost of $50 million.

Sea Shadow’s purpose was to test radar-cloaking technology and other naval engineering innovations. Many of its breakthroughs can be seen in present-day Navy warships.

Even at nearly 30 years old, Sea Shadowremains the most radical ship afloat.

- More… :arrow:

- Direct to the photos… :arrow:

 

Supreme Court Shoots Down Warrantless GPS Tracking

Tuesday, January 24th, 2012

The U.S. Supreme Court might have delivered a big blow Monday to GPS surveillancetechniques used by law enforcement.

In effect, the justices ruled that long-term surveillance of a vehicle by attaching a GPS device without an extended warrant is a violation of the Fourth Amendment.

In three separate opinions, the nine justices confirmed that law enforcement’s placement in 2004 of a GPS tracking device on the vehicle of accused drug trafficker Antoine Jones’ vehicle for a period of 28 days constituted a “search,” as defined by previous case law concerning the Fourth Amendment.

The justices differed, however, on the particulars of how the GPS technology was utilized.

A joint FBI-police team in Washington, D.C., had a warrant, but it was only authorized for use within a 10-day period and only in the District of Columbia. Officers waited until the 11th day to attach the GPS device and did so in Maryland, outside of the warrant’s jurisdiction.

Writing for a five-justice majority, Antonin Scalia, joined by Chief Justice John Roberts and Justices Anthony Kennedy, Clarence Thomas and Sonia Sotomayor, believed that further justification was needed before using a GPS device in the situation.

- More… :arrow:

 

The High Cost of Low Bandwidth

Tuesday, January 24th, 2012

As more and more information is finding its way onto the Web, great swaths of our physical infrastructure are becoming obsolete. 

When we attempt to understand the implications of the Internet Age, the first thing we need to do is recognize that office buildings, retail stores, air travel, lecture halls, and paper are just clunky, expensive, and low-bandwidth interconnections.

Allow me to explain. Many things that seem as solid as the Rock of Gibraltar are, in fact, information proxies in disguise. We can view these information proxies as two separate pieces: an information-sensitive piece, and a second piece with a valuable function that cannot be displaced by better virtual environments.The Internet peels away the information-carrying portions of these physical things and institutions. Frequently it leaves behind skeletons of little value. In the process, the Internet restructures and renders much of our physical infrastructure obsolete.

For example, there are lots of reasons to go to a retail store. The shopper may go to a clothing store because he enjoys the experience of looking at the merchandise. He might want to find out what is available and how much it will cost, or feel the material, or leave the store with a suit he can wear the next day. Many, but not all, of the reasons he went shopping were to gather important information, yet there’s a lot of infrastructure associated with delivering that data. There’s the store itself and the shelving and display cases piled high with merchandise; employees to answer questions and operate the cash register; logistics systems and delivery trucks that carry merchandise to the store. Then there are the costs of keeping the stores lit, cool in the summer, warm in the winter, and clean at all times. Of course, the customer could not avail himself of all these information services without getting in a car, driving to the store, parking it in a garage, and buying gas.

Most of that information can be obtained without the car, without the shelving, without the employees. One of the reasons online retailing has been so effective is that it reduces many of these infrastructure costs while delivering the information the customer needs about price, availability, and size. Retailers engaged in the sale of commodities like books, CDs, blue jeans, and running shoes will find it increasingly difficult in the face of Internet competition. Some will be spared — the stores where customers really do want to see and feel the goods, and leave with them right away. (Upscale boutiques, for example, where the shopping experience is paramount, will be affected less.)

It’s not just retailers who will be transformed by the unbundling of information dissemination from physical locations. The need and function of places that support/reinforce interconnectedness will similarly diminish and change. An office building is both an information warehouse and an information exchange. In the future, the most important function it will perform is to provide a comfortable and productive location for face-to-face interaction. With more of us carrying our file cabinets in our laptops, cramming our overloaded out baskets into our PC’s and doing jobs for ourselves that administrative assistants used to do, the office of the past will probably become a warren of comfortable meeting rooms surrounded by temporary desks for those who choose to come to work that day. Those laptops will become smaller and lighter as files and applications move into the cloud.

In the case of a university, it is relatively easy to see the large-lecture classes, a strictly information-carrying portion of the educational process, being displaced by virtual courses. The university of the future will probably focus much of its energy on mentoring, small seminars, and guiding student laboratory and research experiences. A university where the vast proportion of the educational process focuses strictly on transferring information could well melt into virtual space.

The future will look very different as we strip the information-carrying functions out of proxies and reduce them to their bare essentials. Entertainment centers will be redefined. Libraries will take on new charters. Educational institutions will be restructured. Cities will be transformed. This will happen because much of our physical infrastructure was just a low-bandwidth interconnection disguised as something real.

- To the original… :arrow:

 

Cameras May Open Up the Board Room to Hackers

Monday, January 23rd, 2012

One afternoon this month, a hacker took a tour of a dozen conference rooms around the globe via equipment that most every company has in those rooms; videoconferencing equipment.

With the move of a mouse, he steered a camera around each room, occasionally zooming in with such precision that he could discern grooves in the wood and paint flecks on the wall. In one room, he zoomed out through a window, across a parking lot and into shrubbery some 50 yards away where a small animal could be seen burrowing underneath a bush. With such equipment, the hacker could have easily eavesdropped on privileged attorney-client conversations or read trade secrets on a report lying on the conference room table.

In this case, the hacker was HD Moore, a chief security officer at Rapid7, a Boston based company that looks for security holes in computer systems that are used in devices like toaster ovens and Mars landing equipment. His latest find: videoconferencing equipment is often left vulnerable to hackers.

Businesses collectively spend billions of dollars each year beefing up security on their computer systems and employee laptops. They agonize over the confidential information that employees send to their Gmail and Dropbox accounts and store on their iPads and smartphones. But rarely do they give much thought to the ease with which anyone can penetrate a videoconference room where their most guarded trade secrets are openly discussed.

- More… :arrow:

- Research thanks to Gerry B.

Paybacks are hell: Parental spying prompts infiltration of German police system

Wednesday, January 11th, 2012

Der Spiegel published a story in yesterday’s edition of their magazine that the hack on the German police surveillance system “Patras” was prompted by a senior officer spying on his daughter’s internet activities.

The Patras system is used by the police to track suspects using so-called “silent” SMSs and GPS tracking devices planted on automobiles.

It appears that a senior policeman from Frankfurt am Main installed spyware onto his daughter’s computer to keep an eye on her online activities.

It is unclear whether this is legal under German law. It is also unknown whether he used the famous Bundestrojaner or some sort of commercial off-the-shelf spyware.

One of his daughters friends then discovered the spyware on her computer and decided that was justification enough to hack into her father’s computer.

Upon invading her dad’s system he found a selection of sensitive security related emails that enabled access to the Patras system. Two German hackers from a group called n0n4m3 cr3w (noname crew) were arrested after the system was breached in July of 2011.

According to Der Spiegel the policeman had redirected his work emails to his home computer. I expect that this is against the rules and is almost always a bad idea.

The worst part is that such a sensitive network used to covertly track people was accessible without any sort of two-factor authentication.

You would hope that intercepting a few sensitive emails would not provide enough information to allow a VPN connection or access critical infrastructure with such ease.

It is not clear whether this incident is the one that resulted in the successful attack against Patras last summer, or whether they were in fact breached twice.

It is one thing to accept the need of law enforcement to track suspects after receiving the approval of a judge, but it is becoming clear that access to these systems is too easy. It almost invites abuse and could result in criminal cases being compromised.

With great power comes great responsibility, and hopefully the German police have implemented more strict access controls and other authorities with similar power have heard this story and will look into their own security.

- To the original… :arrow: