Archive for tag: efficiency

CODE: Data First

Courtesy of Greg

DataFirst

 

DATA FIRST

A discussion going on in the studio the other day fitted very well with a programming pattern that I learned, years ago, that I simply refer to as ‘data first'.

Pretty much all programming involves taking some source data and displaying it to a user. This may be in the form of descriptions and prices on a typical e-commerce product page, or perhaps your character's environment positional information rendered in full 3D in the latest games. When faced with the challenge of presenting some data to a user it is often tempting to go dive straight in and start drawing things but that's often a very bad idea.

 

FOR EXAMPLE

My favourite example of this is a typical calendar, similar one you may be familiar with from Outlook, i.e. a vertical strip of times with events shown as squares with a short title. Behind the scenes, the raw data for one of these events is likely to include a start time and then either the duration or an end time; any given day will be made up of several of these events.

Displaying these is easy then, simply get the events in order of start time and draw a box the relevant size - right? Well, that will work for basic cases but what about when you have appointments that overlap (and I can think of a few reasons, merging another calendar for one)?

If you've already started drawing your appointments and find the next one overlaps, you have a problem, attempting to undo the already drawn information certainly won't be pretty.

 

AND YET

And yet there's a simple solution: before attempting to draw anything, process the list of appointments and calculate how many overlaps each one has. This gives you the relative width of this appointment e.g. three overlapping appointments = 1/3 of the available width each.

Don't be afraid to create some more additional ‘meta' data if you need it, the end result will almost certainly be:

• quicker to build
• easier to debug
• easier to read
• generally more elegant

In this case, store the value either against the event data object or in an easy to access array. Now when you start drawing the list you can limit the size of the box according to this custom ‘meta' data. Data first.

I originally learnt this lesson the hard way back in the old ASP days and began to split code into ‘data' and ‘render' sections, something that years later seems to align strongly to the ‘MV' part of MVC. Although .NET's interpretation of MVC guides developers down this route anyway for a main project, it's still worth bearing in mind because it can apply equally well to single classes, components or JavaScript to name a few.

It may be a simple solution, but it makes a big difference. As we've said before, SIMPLE = GOOD!

 

STUDIO: Excel efficiency tips pt1

Courtesy of Anastasia

RedHead

Since joining Signals six months ago I have been working on a lot different projects, several of which involve content management and analysis. For tasks like this it is important to have the right tools for the job.


When inputting data, running data checks and tests or analysing data reports, there are several spreadsheet functions that I use on a regular basis to make my work more efficient. Not only are these functions time-saving compared to manual analysis, but with the right formula they provide correct results every time.

For example, looking through data logs with a 'filter' function I can easily identify unique factors shared by a small group out of thousands of results.

With the 'if' function I can easily compare data from two different sources and immediately identify the differences.

 

Filter

Filters can be used to hide or reveal data in a column based on the data entered.
Unlike the Sort function, filters can be set to reveal certain sets of data and exclude others.

PROBLEM:
You want to view only one type of data from a spreadsheet
(Example: You want to highlight cells which contain email addresses, in a spreadsheet with a mix of data)

1. Click the column you want to filter. In the data toolbar, click "Filter".
2. A button appears on the top of the column which reveals a drop-down menu.
3. Select Text Filters > Contains, and enter the "@" sign to return all rows which contain this character in the selected column - cells with email addresses.
4. In the Home toolbar, apply whatever formatting you want to make these cells or rows stand out.

 

IF Function

The "IF" function can check if a cell meets certain conditions. It can be very useful when comparing two cells against each other.

PROBLEM:
Compare the differences between 2 lists
(Example: There's a long list of translations. You want to identify the words which haven't been translated yet)

1. Let's say that the words in English are in column A and the translations are in column B.
2. In cell C1 write this formula =IF(A1=B1,"Not translated","OK")
3. This formula will compare the cells A1 and B1. If they are identical, cell C1 will show "Not Translated", otherwise it will show "Ok"
4. With C1 selected, drag the black square at the bottom-right of the cell to the end of the first 2 columns to apply the formula for all rows.
5. To show only the non-translated rows, use the filter on column C and untick "OK".

 

PROBLEM:
Identify missing data by comparing 2 lists
(Example: You want to identify the items in List X which are missing or different in List Y)

1. Copy and paste List Y to the end of List X (i.e. if List X ends on row 499, paste the List Y to start on row 500)
2. While List Y is still selected, use the Fill tool to change the background of List Y's cells to yellow.
3. Highlight column A (the column containing the lists) and sort the column A-Z using the Sort button on the data toolbar.
4. In cell B write the formula =IF(A1=A2,"Same","Different")
5. This formula will compare a cell with the cell below it. If they both have the same value, B1 will return "Same", otherwise it will return "Different"
6. With B1 selected, drag the black square at the bottom-right of the cell to the end of the first column to apply the formula for all rows.
7. Select both column and use the filter function on column A to return only the List X rows. In the filter drop-down menu select Filter by color > No Fill
8. This will display the rows in List X, with information as to whether they are the same or different to List Y.
9. To display the rows which are different, use the filter on column B and until "Same".
10. You may want to use the formatting tools on the Home toolbar to mark these in red font, then remove the filtering to see the two lists.

 

RIGHT

PROBLEM:
The data you need is at the end of each cell
(Example: You have a list containing product names and codes. The product codes come after the name, and you just need a list of the codes)

1. If the list of names is in column A, enter the following formula in cell B1: =RIGHT(A1,8)
2. This formula will return the rightmost 8 characters of cell A1.
3. Drag the formula down to the end of the column.

 

LEN

PROBLEM:
The data you need is everything except the first 10 characters of each cell
Example: You have a list containing product codes and names. You just want the name of the product, which comes after the 10-digit code.

1. If the list of names is in column A, enter the following formula in cell B1: =RIGHT(A1,(LEN(A1)-10))
2. Again, cell B1 will return the rightmost characters of cell A1.
3. How many characters will it return? It will return (LEN(A1)-10) characters, which means the number of characters in A1 (LEN(A1)) minus 10.
4. For example, if the product name and code combined is 32 characters long, this formula would return the rightmost 22 characters of cell A1.

 

The use of these spreadsheet functions has been integral to much of my work, saving time and improving accuracy. I hope these can be useful to you too!

Signals can turn your complicated Excel worksheets into simple online tools. Read all about it!

STUDIO: To Wiki, or not to Wiki?

Thoughts on our flourishing internal Wiki, courtesy of Jo

Spring

Creating our own internal Wiki has been a new and exciting challenge for Signals. The hope is that instead of racing about trying to find the one and only person in the company who seems to hold that crucial piece of knowledge in his/her head (and then finding out they are in a meeting in Edinburgh or have fallen down a random pothole), you can just look it up on the Wiki and ta da! There it is. Crisis averted. No time wasted.

That's the dream and we've made a great start, heading into 2012 with the beginnings of a Wiki that is already proving very useful. Not just for technical development challenges and project processes but for the everyday, much simpler and often overlooked conundrums like "how do I scan from the office printer?"

With everyone contributing their wisdom and experience to the database it is becoming a truly powerful tool; an ever changing, up to the minute encyclopaedia of Signals knowledge. In our never ending quest for efficiency we feel pretty chuffed that our working practices are well on the way to being so STREAMLINED and frankly SENSATIONAL.

So, to Wiki or not to Wiki? Here is the answer: To Wiki...definitely!

 

The Signals Wiki reflects the values that are at the core of our business. Whether you're looking for greater efficiency, easier ways to do business, a more effective sales force, or better communications within and beyond your enterprise, we have the experience, technology and creative skills to deliver it for you. Find out more HERE.

DECEMBER 2011

'Twas the deadline before Christmas, when all through the office.

Not a creature was moving, from their desks.

 

Dec2011

 

Deadlines are our friends! And with the Signals Framework for business efficiency we can improve your chances of meeting those deadlines in good time, leaving all the more spare for champagne and cake.