General Musing

blaze your trail

Archive for the ‘programming’ Category

XBMC BlastDav by Adrianus Warmenhoven

leave a comment »

XBMC BlastDavAdrianus Warmenhoven wondered what the minimum that XBMC needs to use a WebDAV server. So he scaled back all the unneeded functionality to create an easy media server for broadcasting te XBMC on any of your devices.

XBMC Blastdav Adrianus Warmenhoven  Company

Ever since the original XBox with a modchip was capable of running XBMC I used and recommended XBMC to friends and acquaintances as the nicest media player. Now Android and the Raspberry Pi have come …

View or comment on Dani??l Crompton’s post »

Written by Daniël W. Crompton (webhat)

December 25, 2012 at 8:02 pm

Posted in programming, review, technology

Tagged with ,

They tried to make me go to Rehab

leave a comment »

Written by Daniël W. Crompton (webhat)

November 1, 2012 at 3:40 pm

Spreading Passwords over Multiple Locations #security

leave a comment »

Spreading Passwords over Multiple Locations #security ??RSA’s new approach is a version of a technique known as threshold cryptography, which has long been explored by researchers. They split the password in chunks and store the chunks over multiple servers.

http://www.technologyreview.com/news/429498/to-keep-passwords-safe-from-hackers-just-break/

To Keep Passwords Safe from Hackers, Just Break Them into Bits – Technology Review

Millions of passwords have been stolen from companies such as LinkedIn and Yahoo. A new approach aims to prevent future heists.

View or comment on Dani??l Crompton’s post »

Written by Daniël W. Crompton (webhat)

October 10, 2012 at 3:26 pm

Posted in algorithm, database, security

Tagged with ,

Mac Screen Saver Issue #security

with one comment

Apple Logo

Sometimes I need to use my computer to read things, as somebody who considers himself security conscious it means I need to have my finger at the ready as my computer turns on the screen saver after 3 minutes (180 seconds) and password locks it. However I do need to be able to read something without needing to be sure to interact with my HIDs. My old solution was to set my screensaver to lock after 15 minutes (900 seconds), however this poses a security risk as I can forget to lock my screen using the hot corner (see image) if I were distracted by something.

System Preferences - Screen Saver

So I needed a way to automatically reset the screensaver back to the 3 minutes after a grace period. OSX has a tool called default which allows changes to be made to the system settings, and it allows you to change the screensaver like this:


defaults -currentHost write com.apple.screensaver idleTime -int 180

Now the only time I really do this is at home, so I need my computer to be secure before I leave for work in the morning. I decided that 8:30 would certainly be a time that I would still be in the house and my Macbook would be open should I have forgotten to reset the timeout. So I first added this following line using crontab:


30 8 * * * defaults -currentHost write com.apple.screensaver idleTime -int 180

Naturally this is still not very secure, sure the effort is half way there, and it should really reset it more often. Perhaps I would want to set it every 15 minutes, which should give me a maximum grace period of 15 minutes. This would be unhandy in the evening when at home.


0,15,30,45 * * * * defaults -currentHost write com.apple.screensaver idleTime -int 180

Or every 15 minutes only for the period of time you are in an environment where you may not entirely control who has physical access to your machine. This could be on a customer site, at a conference or in a shared office space. Or at home while the kids are still awake.


0,15,30,45 8-21 * * * defaults -currentHost write com.apple.screensaver idleTime -int 180

This says between the hours of 8:00 and 21:45 I want you to set my screen saver to 3 minutes every 15 minutes.

Image source: me, Brian Solis

Written by Daniël W. Crompton (webhat)

September 22, 2012 at 8:25 pm

Posted in access, lifehacks, OSX, security

Continuous Integration vs Continuous Deployment

leave a comment »

Continuous Integration and Continuous Delivery or Deployment are terms which are often heard, and the former is sometimes confused with the later. So what are they and why should you care?

Continuous Integration (CI) is a process of linking the code the code that is being developed in the company into a quality control system. This can be for homogenous or heterogeneous code environments. A simple example is of a tool which is being developed in the company by multiple developers. To ensure that the new code complies with all the new requirements and still works with the existing code or data model, a set of automated unit, functional, integration and verification/validation tests are created to verify that this true. All the test sets can cover different parts of the functionality from low level code tests to the highest level user experience tests. The final acceptance is done by a human and deployed explicitly.

With Continuous Deployment (CD) the philosophy is taken one step further. Rather than having a final acceptance by a human who would deploy the application explicitly, the assumption is made that the level of testing is sufficient that the final manual stage can be automated. This means that the live/production software is continuously replaced with the newest version that passed all the tests.

As I first explain the process of CI most developers, they are quite enthusiastic. Once they realize that it means that they need to write unit tests they suddenly start thinking it sounds quite difficult. They think that they need a well-developed test-suite required to achieve automated testing advantages. This is naturally not true. Just as with writing new code unit tests can be created incrementally for existing code. Before changing any existing code first write a suitable test which ensures that the changed code will perform in the same way as the existing code so as not to break the existing code or any of its dependancies.

Whereas while first explaining the process of CD to most development teams they think that it is impossible to continuously deliver software that could be deployed directly to the live environment or customer. Yet they forget that in many cases they themselves are guilty of deploying less rigorously tested software into a production environment. Many managers usually simply state that it cannot be done. And it usually cannot be done before a CI has been in place for a while, and unlike CI it needs more than just a large set of unit tests. It also needs a test suite of functional, integration and validation tests.

What I consider most important for CD is to change the way bugs or suspected bugs are handled. Currently many bugs are closed with the message “could not reproduce”. In a CD environment there is no reason to not write validation tests for all bug reports. Consider it possible that all bugs, including irreproducible bugs, are suggestions for validation tests, if you believe that a bug should not happen it should be tested for.

Image source: xt0ph3r

Written by Daniël W. Crompton (webhat)

July 24, 2012 at 1:12 pm

5 Missteps in Writing Code

with 4 comments

Like most developers I am constantly struggling to deliver in the face of unrealistic or extremely tight deadline, which can be self imposed or come from external sources. As I will likely discuss in a future article this can be due to over optimism or rigid planning in the face of customer demand. It can also be due to missteps which the developer themselves have made. Read the rest of this entry »

Written by Daniël W. Crompton (webhat)

July 18, 2012 at 8:06 am

Just Finished Reading: Battle Hymn of the Tiger Mother #books

leave a comment »

I started begging my mother for piano lessons from a very young age, had my mother been a Tiger Mother I would have been a child prodigy. I’d seen Amy Chua in an interview program and had wanted to read Battle Hymn of the Tiger Mother as an instruction manual to raise my child as a music virtuoso. And although the book is not a step-by-step guide to becoming a Tiger Mother I am glad I read it.

The book is an autobiographical view of the way Amy Chua raised her daughters Sophia and Louisa (Lulu) to become straight A students, and focusses mainly on her teaching her children to play the musical instruments of her choice. In the end it devolves into a war of attrition between Amy and Lulu, resulting in a revelation for the Tiger Mother.

Read the rest of this entry »

Written by Daniël W. Crompton (webhat)

April 27, 2012 at 8:37 am

Posted in algorithm, books, risk

Tagged with , , , , , , ,

What is wrong with ICT?

leave a comment »

A day ago I read PHP: A fractal of bad design, and it made me sit down and think about writing this entry, of which the kernel has been gestating for quite a long time.

I see this a lot; pro’s ranting about an aspect of our ‘craft’ that has gone totally pear-shaped; programmers complaining about the languages or the quality of code they are asked to fix and/or maintain, systems administrators that just can not believe the insanity that is brought down on them because of either laziness of the in-house personnel or management-made bylaws.

Cryptographic specialists (even mildly spoken ones like Bruce Schneier), hackers nee security specialists, software designers… the whole palette of people that actually are proficient in their work gripe and complain.

Read the rest of this entry »

Written by Adrianus Warmenhoven

April 17, 2012 at 11:27 am

Posted in business, programming, risk, technology

Tagged with ,

Red Hat Open Cloud Tour #RHCTams #conference [UPDATED]

leave a comment »

Today I spend my day at the Red Hat Open Cloud Tour, this is what happened today:

Just heard the opening by Rajiv Sodhi, who is here despite having a baby due any moment.

Margaret J. Rimmler’s keynote was interesting. One of the key takeaways being openness RedHat customers should have the choice to remain portable and replace RedHat, if that is what they want. Read the rest of this entry »

Written by Daniël W. Crompton (webhat)

April 3, 2012 at 7:43 pm

Scrum Masters as Sri Ganesha’s pundits #agile #xp

with 2 comments

You would probably not associate a god from the Indian pantheon with an Agile methodological, and there are many things that can be learned for Scrum masters from Ganesh.

In Scrum the Scrum Master focuses on 4 key areas:

  • remove impediments
  • buffer against distracting influences
  • enforcer of rules
  • focusing team on tasks

Ganesha is the Lord of Obstacles, both material and spiritually. And is worshiped as the remover of obstacles, although he also places obstacles in the path of worshipers. The Scrum Master also removes the impediments and places obstacles in the path of the team members. Ganesha fans his ears constantly to symbolize that often words are spoken, but one is not receiving inside. This is what happens when the length of the meetings is too long, or it digresses off-topic. This is also what the broken tusk is said to symbolize, with oneness of mind and single-minded devotion you can achieve everything. In your team you can keep your focus by focussing the energies on the ability of the team to create results, and allowing the members to achieve.

Image source: Vijay Bandari – Wikipedia, Anamika S

Written by Daniël W. Crompton (webhat)

March 29, 2012 at 11:15 am

Posted in business, humour, programming

Tagged with , , , ,