Showing posts with label work. Show all posts
Showing posts with label work. Show all posts

Thursday, May 30, 2013

note to self, how to fix "requires installation of untrusted packages" in Ubuntu


I tried to install a couple of updates on my work laptop, running Ubuntu 12.04, a minute or two ago when prompted by the update manager, and I got the "requires installation of untrusted packages" error. I've since dicovered that there are two ways round this, one is to allow untrusted packages by doing the update as root or via sudo, and saying "y" when asked

Install these packages without verification [y/N]?
But I don't like that, you don't know who might be spoofing you with what fake packages. The better way is to rebuild the apt cache. I found the instructions here, I'm claiming no credit for solving the problem, just reproducing them below so that I can be sure to find them again next time I need them. Hopefully some of you who read this in the future will also benefit.

sudo apt-get clean
cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get clean 
sudo apt-get update

Enjoy!


Friday, May 25, 2012

If Google and Oracle made aeroplanes where would your sympathy lie then?


There's been a lot of talk about the Oracle vs Google court case, and I was reading this when it occurred to me that I have a few reservations about the strength of Google's argument, and perhaps you'd like to hear them.

If you know about the technology you might want to skip ahead a bit, but I have to cover off some background, so we all know what we're talking about.

My thinking first took shape when the Apache Software Foundation (ASF), of which I am a member, was making its initial steps towards developing a Java Virtual Machine(JVM). At its most simple abstraction the JVM is the thing that runs on your computer, and in its turn it executes the java programs, they are loaded into it. The JVM "hides" the differences between operating systems from the Java programs. For example Mac's and Windows might have different ways for a program to interact with memory, the JVM provides memory management which is the same for all java programs, to make this happen a Windows JVM will be different "inside" than a Mac one.

So Apache were attempting to create an Open Source JVM called Harmony, and it was during early discussions about the "Java Mail API" which I was involved in that I first ran into the issue which is being tested in court right now. (we will ignore the definition of an API at the moment, because we come to that a bit later, it stands for "Application Program Interface" but you don't need to know what that means)

 I was PMC Chair of Apache James, a 100% Java email application server, and I had got chatting to the Harmony folks about one thing and another when the subject came up about whether an ASF licenced version of the JavaMail API  would have a more natural home amongst the java email fanbois of the James project because it is a framework that allows people to write java programs that handle email more easily.

So I started to think about what this would mean from a code perspective, and began to untangle things in my head, here's where I get to the point, stop skipping!

The thing that we call "JavaMail" is composed of three parts, and this is true for many other Java API's including the ones in the court case, and in fact much of the JVM itself. Those parts are:

i) A specification or definition, this part is the API specification.

b) An internal component which makes one half of the software, This part is the API interface.

2a) An example of the other half that you are free to use, or to replace with an implementation of your own. This part is an implementation of the API, whoever wrote it.
 
If we use an analogy here, to avoid getting bogged down in abstract descriptions of computer science ideas, we can imagine that an airliner manufacturer would manufacture the floor in such a way as a seat manufacturer could manufacture seats which could be installed after the plane is built, without the plane having to be adapted.

In order for this to happen the specification for the floor connections would be published and made available to seat manufacturers, who would then compete their little hearts out to make the best/cheapest/lightest seats on the market compatible with the floor specification, and sell them directly to the owners of the planes to be installed after the plane is delivered.

The airliner manufacturer will make floors and install them in customers planes.

The specification is a piece of intellectual property, it has taken time to produce and does have some intrinsic value.

The situation in the Oracle v Google case would be analogous to the situation in which a rival airline manufacturer has published an identical copy of the specification of the floor, manufactured compatible floors and is wooing customers and seat manufacturers from the originator of the specification with the promise of compatibility for all the seats and tooling and expertise that they have invested in.

What Oracle are contending, or trying to, or failing to, or *ought to be* saying, is that the specification is not in the public domain, it is their intellectual property and they are within their rights to restrict its use to allow people to implement the replaceable parts (the implementations, the seats), and not the internal part (the interfaces, the floor). In other words, not only is it breach of copyright (as the court has recently determined) but it is also probably not "Fair Use" (which they are still to decide upon) for Google to produce an API of their own to Oracle's specification. If it is, then people are going to very quickly stop publishing API's that allow competitors to benefit from years of research and development.

Of course this is then masked by a big shit-storm of FUD and misdirection by both sides, trying to veer off the subject onto other more easily determined areas of IP law where they believe they have an edge, such as:

The "field of use" restrictions, which are important but not directly relevant to the API arguments.

Patent infringement, of course, which is the modern lawyer's soup-of-the-day for the whole decade and IMHO totally irrelevant here.

And the distracting but easy to comprehend copy'n'paste IP crime where code appears to have been copied from somewhere that it couldn't have been legally.

The last one is the worst FUD of the lot because that is copyright infringement, as is the case where the specification is used in contradiction to the terms of its licence, but its a different crime, a separate incident, qualitatively something else altogether .

From this point of view I don't think Google's position is as solid as they might want it to be, or as solid as the judgements may suggest, but the truth of the matter is that Sun caused this whole debacle by vacillating over the legal status of Java, the API's the JVM, the TCK and a raft of other things that they thought morally *ought* to be open source and free for people to use for any purpose but weren't in law, because they never made it clear enough what was being explicitly permitted and what was being benignly tolerated.

And that is why I have mixed feelings about the merit of Google's case, and some grudging understanding of Oracle's position, and a bad taste in the mouth about Sun's failed attempts to be Machiavellian with the IP laws.

And if you're wondering what happened to James and the JavaMail API, we never did take it on, its a very poorly designed API and would have brought us a lot of work with precious little benefit.


Wednesday, October 19, 2011

Eek! a Patent Troll


So, yesterday a patent troll in the form of a company called Kelora Systems, LLC came to my attention, for reasons which need not concern us at the moment. And having followed up on it a bit  I can now understand why so many companies are involved in the aparently insane pastime of suing and counter suing each other through nearly every court in the world. I'll tell you why in a minute, but forst to kelora.

What staggered me is that they claim that they hold a patent, 6,275,821, known rather familiarly as '821, which covers "a method and system for executing a guided parametric search"

What is that? I'll tell you in a few short lines what the patent takes pages to painfully struggle to express:

In order to help people select a product from a catalogue the system displays a list of products and product attibutes.
Then, on the user selecting values the list of products is filtered to show only matching products, and the available attribute values are filtered to only show ones which still apply to the subset of products.

Or more simply still, if your system shows a list of products and gives the user the ability to filter this list by price, or size, or colour, you are potentially infringing the patent. My favourite example can be seen in the left hand column of this page (on a website which isn't within the jurisdiction of the US courts).

I hear you, you just said OMGWTF, didn't you? Yeah, so did I.

So I dug into it a bit and uncovered some interesting bits and pieces, first of all these trolls are gunning for just about everyone you could imagine, and a whole lot of other folks too. And it seems like there are legal challenges afoot by a number of big hitters to get the patent overturned, this from last year which was only partially sucessful and another move in the federal courts to be heard in November (2011).

I know theres a lot of talk about software patents, but for someone to be allowed to use a patent for something as self evident as the "method" and as dated and stuck in the 90's as the "system" is a total indictment of the whole notion. I could understand the intention (but not necessarily agree with it!) if the company had invented a useful product which was differentiated on the basis of the method, and sought to protect their investment, and if it was limited to the field of use originally intended, but this is little more than a patent on the application of common sense to a well recognised pattern of problem (how do you let people browse an online catalogue).

If the US patent office allows people to patent things as non specific as this its little wonder the courts are filled with patent cases, this isn't protecting your R&D this is a land grab for the common sense of the future. And if the courts continue to uphold patents like this, and the patent offices of the world carry on granting them we may find ourselves in a situation where innovation is held to ransom by lawyers and patent trolls.


Note to self, how to get a list of recipients from the maillog


I spent a while figuring out how to get a list of email recipient addresses from the maillog, without duplicates, for a specific day on RHEL. In the end I distilled it into to one line.

I'm sure I will have to do it again, so I'm making a note of it here, meantime if you need to extract recipient addresses from maillog you're welcome to try it. just paste it onto the command line and hit the go button, its surpisingly quick.

cat /var/log/maillog | grep "Oct 19" |\
grep to= |cut -f5 -d":" | cut -f2 -d"=" | cut -f1 -d"," | \
sed 's/<//' | sed 's/>//' | \
sort | uniq > addresses.txt


Friday, August 19, 2011

Dipping a toe in FCommerce


FStore Homepage
 Today AllSaints launch our Facebook store (US store follows next week), click the link to browse, view products and buy them directly from within Facebook.

We spent a lot of time looking at other peoples' facebook stores, and rather than try to cram everything in we decided that ours should not be only a replacement for our web store, instead we thought that as we have too much in our catalogue browsing it in facebook would be too cramped an experience. Rather it is intended to promote our web store to our facebook fans, and allow us to do more to monetize our investment in facebook.

FStore category view
We wanted it to blend in well with facebook, and to be a familiar environment for facebook users, not look just like our web store in an iframe. As we see with ASOS and JC Penney. I'm sure that works for those guys, but we wanted to take a more joined up approach to "fcommerce" and to augment and enhance our customers choices and their experience of our brand.

So we have created a place where we can showcase a selection of products, in a specially selected range of categories. Our visual merchandisers have full control of the catalogue, using the same systems that they use to merchandise our other online channels, and I hope that in the coming weeks we will see the facebook store take on a character of its own, seperate from, but complimentary to, our main web site.
FStore product detail

FStore embedded "cart"
And now our fans can buy things that we promote on facebook without having to find them again on our website.

Good Job Team!


Tuesday, June 07, 2011

+1 button


As an experiment (and before I let anyone go anywhere that near my employers precious website with it) I added the google +1 button to this blog today.
Unfortunately while I understand the idea of giving a bit of content an Big +1 I can't see where anyone would know that I've +1'ed anything.
If you have more of a grip of reality than I do, do let me know!

UPDATE! I found out, you need to use google.com not google.co.uk[1].. hardly had I done this and +1'ed things than +1's started showing up in my search results.. 















[1] I had to go to my google profile, enter a search term in the search box, then click "reset search tools" and I was on google.com instead of .co.uk


Thursday, September 23, 2010

Note to self, how to install apc


Want to install apc on CENTOS or RHEL?
REad this: http://www.agileapproach.com/blog-entry/howto-install-pecl-apc-cache-centos-without-xampp


Tuesday, September 21, 2010

Note to self, want stats on nfs usage, try this


I thought I'd put this in as well, since I had to google for it, using -n will make iostat provide you with stats for nfs shares too.

iostat -nh 5
You can also use nfsstat

nfsstat -cvn -o nfs


Wednesday, September 01, 2010

note to self, how to change the definer of a mysql stored procedure


This is a useful one if, like us, you find that the account used to create the procedure doesn't have the privileges required to execute it, or perhaps you've revoked the original definers grant. (DoH!)

ALTER PROCEDURE procedure_name SQL SECURITY DEFINER;javascript:void(0)


Tuesday, August 31, 2010

note to self, how to use your favourite editor for the crontab without changing it permanently


I like to use nano to edit the crontab, but I don't want to change the default editor.
(Some people are very un-funny about that kind of thing!)

This is the one-liner to use nano, and I seldom remember it.

env EDITOR=nano crontab -e


Wednesday, August 25, 2010

note to self, how to make a mysql instance read-only


Another piece of DBA hoodoo that I seldom need!

SELECT @@global.read_only;
SET GLOBAL read_only=1;
SELECT @@global.read_only;


note to self, how to skip a mysql replication error


Another one that I have to google every time.
Not being a DBA I don't do this very often, but now and again I find myself in the Hot Seat.

SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SHOW SLAVE STATUS;


Wednesday, August 18, 2010

note to self, how to convert pfx to pem without passphrase


I do this so infrequently that I always have to google it.
Now I can search my own blog!
openssl pkcs12 -in mycert.pfx -out certificate.cer -nodes


Wednesday, November 18, 2009

Apache James is 10 years old too.


Happy Birthday Apache!

I was checking out the 10th anniversary press release

Several Apache projects also celebrated their 10th anniversary
and realised that Apache James is 10 years old this year as well. Way to go James Team, 10 years and we still haven't resorted to physical violence. Check the wayback machine if you don't believe me.

The top level project was established by the Board on January 22, 2003, with these ugly dudes on the 1st PMC:
Serge Knystautas
Danny Angus
Peter Goldstein
Noel Bergman
Charles Bennet

And I read the two documents The ASF was sent, I think I'm going to move to Oakland, or at least adopt their public holidays.

The Mayor of Oakland's proclamation that november 4th is Apache Software Foundation day wierd, but cool.

The Letter from Arnie. Question: Will he be back?


Tuesday, April 28, 2009

Swings and roundabouts in IT skills demand


I was looking at this while reviewing salaries and found some interesting trends, reproduced here for your entertainment.

A) Oracle DBA's, polish up those Mysql Skills..

Fig 1 Mysql demand last 3 mths


Fig 2 Oracle demand last 3 mths


B) No one wants your java skills, go learn PHP...

Fig 3 Php demand last 3 mths


fig 4 Java demand last 3 mths


Thursday, October 02, 2008

Phew, made it...


Yesterday we launched two new sites
An online store for Bench Clothing at www.shop.bench.co.uk WHY WAIT BUY NOW!!
This one uses some AJAX and is also integrated right through to the company's Navision system for finance, stock control, and operations in the warehouse, so when you add something to your basket even though the page doesn't reload we've checked the live stock levels to make sure they have what you want.
and a brand site at www.bench.co.uk which is awesome looking and a great achievement by the guys.


Thursday, August 14, 2008

All work and no play ...


... I don't think so, I forgot to add to yesterday's post that as well as all the new folk and new clients we've got new toys too.

We've got two 52" plasmas, one streaming the olympics and one with a Wii, and under my desk is an UrbanTerror server so my department can take out their frustrations by fragging each other at lunchtimes.

Oh... and if you've got flash actionscript 3 skills and can travel to out office get in touch, all this could be yours too.


Wednesday, August 13, 2008

Onwards and upwards..


Yesterday we launched our now corporate website here.

The previous day we inducted two new php analyst programmers and a second business analyst.
Last monday we started a new sysadmin.
We're still looking for a flash actionscript 3 developer.

Now that the new site is up I can reveal that we're working on ecommerce for two exciting fashion brands Bench and Hooch. Its always a challenge working for established brands, but in this case its creating a real buzz in the office, they're going to be cool through and through, from the graphic design to the seamless integration with warehouse and financial systems.

Talking of challenging, the migration of a.n.other client seems to have gone pretty smoothly, some minor issues are outstanding, but (touch wood) everything that's needed is working.

And finally.. we've launched a redesign of Duchamp.


I know nothing, I'm not a fortune teller, and you'd be insane to think that I am. This disclaimer was cribbed from an email footer I once received. It is so ridiculous I had to have it for myself.

Statements in this blog that are not purely historical are forward-looking statements including, without limitation, statements regarding my expectations, objectives, anticipations, plans, hopes, beliefs, intentions or strategies regarding the future. Factors that could cause actual results to differ materially from the forward looking statements include risks and uncertainties such as any unforeseen event or any unforeseen system failures, and other risks. It is important to note that actual outcomes could differ materially from those in such forward-looking statements.

Danny Angus Copyright © 2006-2013 (OMG that's seven years of this nonsense)