Image Image Image Image Image Image Image Image Image
johan

By

June 16, 2014

A Thinner Chair

June 16, 2014 | By | No Comments

leaf_chair_thin_4

Leaf Chair

I thought that the chair may benefit from a thinner construction.  I think this makes the design slightly more elegant, which is not to say it is better, but still something worth exploring.  I did a quick render to show the new look.  You’ll notice that the angles for the backrest and seat are back to 90 degrees, that is because I’ve decide to adjust those once the basic design is in place,  to not add complexity too early in the assembly.

johan

By

April 15, 2014

Turning a Chair into a Puzzle

April 15, 2014 | By | No Comments

pieces

I’ve been having a look at making the chair more comfortable, which meant adjusting the angle of seat and backrest, as well as the height of the seat and the height of the backrest.  One of the consequences is that the chair is now no longer just a bunch of horizontal and vertical lines.  There are many diagonal lines (and some diagonal on two planes), moving at an angle through space, which skews the assembly of the chair. This didn’t really matter until I started breaking the chair up into parts, with the eye on getting a feel for what parts would be needed to assemble it.  I’ve been reading “Design Secrets: Furniture: 50 Real-Life Projects Uncovered”, which talks a lot about the materials and construction used in design projects, and now I’m thinking more about how to practically put this idea together, as a physical object.  I really hope to really make one of these one day.

The beginning of the breaking into parts is what you can see in the image, and the chair in the background is the version that has been adjusted to be more comfortable.

johan

By

April 6, 2014

The Leaf Chair – In Colour

April 6, 2014 | By | No Comments

Adding a little more depth and colour starts to emphasize the core idea.  This doesn’t strike me as anything comfortable to sit on yet, but that can probably be remedied.  I prefer looking at chairs to sitting in them in any case.

leaf_chair_in_colour

johan

By

March 30, 2014

The Leaf Chair – Birth

March 30, 2014 | By | No Comments

I’ve wanted to design a chair for ages. With that in mind, I started work on the leaf chair. This very rough first draft shows the basic idea, of the left front chair-leg forming the stalk of the leaf, and the body of the leaf stretching across the seat and up the back of the chair.

first_rough_draft

johan

By

March 30, 2014

Note: Oracle Related posts are moving

March 30, 2014 | By | No Comments

The Oracle Related posts will probably be moving from shockinggrey.com to jkb.name/oracle (or a similar URL). This blog will be used for some of my other interests. I’ve been planning on a site for what I refer to as DBA “Kata” for a while, and I think the Oracle content will fit better there.

johan

By

June 13, 2013

A little SQL trick

June 13, 2013 | By | No Comments

I’ve been toying with the idea of a wrapper script for generating output in html format with the key goal being to quickly plot the output of a SQL statement as a time-series chart. To this end I wanted to figure out a way where I can execute a query, with some flexibility to control the output format. It was at that point that I figured out a little trick. This may be common knowledge, but to me it was new, so humour me.

In this example I’m using the method to geneare a csv file, not very imaginative and there are easier and more flexible ways of doing this, but it’s a simple place to start.

Here we go. First you have a file called “load_query.sql” which looks like the one below:

with q as
(
@&1
)

Pretty simple stuff. Next we have a file called “csv.sql”, which starts by defining some of the sqlplus output display properties.

-- Parameters
-- 1. Script to execute
-- 2. Output File

-- Settings
alter session set NLS_DATE_FORMAT='DD-MON-YYYY HH24:MI:SS';
alter session set NLS_TIMESTAMP_FORMAT='DD-MON-YYYY HH24:MI:SS';
set heading on
set underline off
set pagesize 50000
set linesize 144
set feedback off
set echo off
set trimout on
set verify off

spool &2

-- Load query and execute
@load_query.sql &1
select q.time || ',' || q.value from q;

spool off

Line 20 & 21 above is where the “trick” comes into play.
In line 20 we execute the load_query.sql script, passing the name of the script that we want to generate csv output for. Note that this script has the following properties:

  • It returns two columns. As the end-goal will be time-series data, we only need time and value columns
  • The query doesn’t end with a semi-colon, that is key, because line 21 is a continuation of the same SQL statement

As an example of a SQL script that can be passed as a parameter when executing csv.sql we can use the query below which shows the number of log switches per hour:

select trunc(first_time, 'hh24') as time ,count(*) as value
from v$log_history
group by trunc(first_time, 'hh24')
order by trunc(first_time,'hh24')

So basically, the csv.sql and load_query.sql files work together to turn the query into the following output:

with q as
(
select trunc(first_time, 'hh24') as time ,count(*) as value
from v$log_history
group by trunc(first_time, 'hh24')
order by trunc(first_time,'hh24')
)
select q.time || ',' || q.value from q;

This forms the basis of a system for working with your script-set in a more dynamic way, giving you control of the form that the output takes. In the next post I’ll show how to use the same principal to create a dygraph plot from query output.

johan

By

November 17, 2011

By Popular Demand – Reventer Detail View

November 17, 2011 | By | No Comments

Reventer users have been asking for a way to view Reventer data in more detail, or at a smaller interval.

Even though it’s always an option to send a csv file to Google Docs and further explore your data there, I agree that it would be good to be able to check out the details on your phone.
The image below is my first stab at figuring out how to make a detailed view for Reventer that will work well on a mobile phone.


Let me know what you think on google+

johan

By

October 18, 2011

Introducing jiTree

October 18, 2011 | By | No Comments

I originally started work on jiTree as a way to improve my understanding of Oracle Indexes. Being a visual person, I often find that more complicated concepts are easier to master when I can see them visualised. So at it’s heart this is intended as an educational tool, to make understanding Oracle indexes more accessible.

A long term goal of the project is to improve the speed and accuracy of the visualisation to a degree where it can be used as a general purpose tool for investigating indexes, but whether this is practical (or can be accomplished in a browser) is not clear yet.
The key to jiTree
Using jiTree is simple. All you have to do is paste an Oracle Index Treedump into the box provided and hit the “Draw Index” button. Once drawn you can view and save an image of the visualisation by clicking the “View as Image” button at the bottom of the page.

Use jiTree

johan

By

October 4, 2011

Oracle Index Tree Dump Visualisation

October 4, 2011 | By | No Comments

 Update: JiTree is an online tool for visualising your indexes.

I’ve been working on a Processing project to visualise Oracle Index Tree Dumps. This is a quick example of the progress. It’s still very much a work in progress, so there are problems to address.

For the test table I’m just copying the dba_objects view into a table.

SQL> select count(*) from dba_objects;

COUNT(*)
----------
68913

SQL> create table test_o as select * from dba_objects;

Table created.

SQL> create index test_o_idx on test_o(object_id);

Index created.

Next I get the treedump as follows:


SQL> select object_id
2 from dba_objects
3 where object_name = 'TEST_O_IDX';

OBJECT_ID
----------
71227

SQL> alter session set events 'immediate trace name treedump level 71227';

Session altered.

Plugging the treedump into my visualisation tool (as I said, it’s a work in progress) gives this view. A very simple tree consisting of only a root node (red) and leaf nodes (clustered around the yellow core).



Now I delete 20000 rows from the test_o table:

SQL> delete from test_o where object_id between 40000 and 60000;

19565 rows deleted.

SQL> alter session set events 'immediate trace name treedump level 71227';

Loading the new treedump shows us where leaf nodes have been deleted.


johan

By

September 22, 2011

one tube minute

September 22, 2011 | By | No Comments

Click here to view the visualisation

When waiting on the platform a minute on the London Underground often feels longer than you’d expect. I decided to investigate this, and get some clarity on the length of one tube minute.

To do this I had to start by gathering the required data.

Data Gathering

Before I could record the duration of one minute according to the arrivals displays on the Underground, I needed to decide how I would measure this minute. Determining the start of the minute was easy. A minute starts when the arrival display switches to show that there is one minute remaining. The end of a minute was trickier to choose.

As far as I could tell there would be three options here:
- When the train enters the station
- When the train doors open
- When the train departs from the station

Because I wasn’t sure that I could always accurately record the point at which the train entered the station, and train departures can be delayed by people stuck in the tube doors, I chose to measure a minute as the time from when the arrivals display switches to one minute, and the time that the tube doors open.

With the method sorted I continued to record data using Reventer.

Visualisation

Having gathered the data I sent it to Google Docs (easy to do in Reventer) and started thinking about the best way to visualise this data. I’d recently read some good blogs about Processing.js, and having played with Processing in the past, I decided to use this to create the animation. I was also reading Nathan Yau’s Visualise This, which emphasizes using data to tell a story. To give readers the chance to experience the duration of the various tube minutes for themselves, I decided on using the animated balls to represent “minutes”.