Jun 95 Challenge
 Volume Number: 11 Issue Number: 6 Column Tag: Programmer’s Challenge

# Programmer’s Challenge

By Bob Boonstra and Mike Scanlin

Note: Source code files accompanying article are located on MacTech CD-ROM or source code disks.

## Goodbye From Mike

This month is a special month. I have decided to turn the Programmer Challenge over to Bob Boonstra. Readers of this column will recognize Bob’s name from his many excellent winning solutions to the Challenges I’ve posed. In fact, Bob is the proud owner of six 1st-place showings. I can think of no-one I’d rather turn this column over to than Bob. I will judge the last two puzzles I have posed and Bob will judge the puzzles he poses (the first of which, Check Checkmate, is in this issue).

It’s been almost three years since I first started this column. While it has been incredibly rewarding to see so much optimal code and meet so many like-minded efficiency nuts, my life has changed during those three years and I no longer have the time that this column deserves. Even though I won't be writing it any more I'm sure this column will remain my favorite part of MacTech (I may even submit an entry once in a while...).

Thanks to everyone who took the time to write to me over the years with suggestions for Challenges. I have given Bob the compiled list of ideas. I’m sure he’d love to hear from you if you have any other ideas or comments on what you want to see in this column. I leave you in Bob’s capable hands...

Optimally yours,

Mike Scanlin
scanlin@genmagic.com

## Check Checkmate

This month’s Challenge deals with the game of chess. You will be given a chess position and asked to produce the list of moves and captures that it is legal for one of the sides to make in accordance with the rules of chess. The objective is to produce the legal move list in minimum time.

Here are the prototypes for the routines you should write:

```typedef enum {rowA=0,rowB,rowC,rowD,rowE,rowF,rowG,rowH} Row;
typedef enum {col1=0,col2,col3,col4,col5,col6,col7,col8} Col;
typedef enum {whiteSide=0,blackSide} Side;
typedef enum {king=0,queen,rook,bishop,knight,pawn} ChessPiece ;

typedef struct Square {
Row row;
Col col;
} Square;

typedef struct PiecePosition {
Square sq;
Side side;
ChessPiece piece;
} PiecePosition;

typedef struct ChessMove {
Square fromSq;
Square toSq;
Boolean moveIsCapture;
Boolean opponentPlacedInCheck;
} ChessMove;

short /*numberOfMoves*/ LegalChessMoves(
PiecePosition piecePositionArray[],
short numberOfPieces,
Side sideToMove,
ChessMove legalMoveArray[],
void *privateDataPtr
);

void InitChess(void *privateDataPtr);

```

This Challenge will consist of one call to InitChess, followed by multiple calls to LegalChessMoves. The InitChess routine will not be timed, and may initialize up to 32K bytes of storage preallocated by my testbench and pointed to by privateDataPtr. Your program should not use any static storage besides that pointed to by privateDataPtr.

Each call to LegalChessMoves will provide a piecePositionArray containing numberOfPieces chess pieces. Each piece is described in a PiecePosition struct containing the ChessPiece, Side, and position. The position is provided as a Square struct containing a Row and a Col, where rowA represents the starting row for the White major pieces, and rowH the starting row for Black. The columns are numbered from left to right as viewed from the White side, so that (rowH, col4) is the starting square of the Black queen in a new game. The piecePositionArray will describe a legal set of chess piece positions, anything from the initial positions in a new game to an end-game position. No position will be provided that could not be reached during a chess game. Remember that due to past pawn promotions, a side may have (for example) more than one queen. You should generate the moves for the side provided in sideToMove. The privateDataPtr parameter will be the same pointer provided to InitChess.

LegalChessMoves should store in legalMoveArray the complete list of legal ChessMoves for the sideToMove. The legalMoveArray will be allocated by my testbench and will be large enough to hold all of the legal moves for the given chess position. You should describe each legal move/capture by placing the row/col location of the moving piece in fromSq and the rol/col of the destination in toSq. In addition, for each move, the Boolean moveIsCapture should be set to true if the move captures an opponent's piece (and set to false otherwise). Similarly, the Boolean opponentPlacedInCheck should be set to true if the move places the opponent in check (and set to false otherwise). The return value of the function should be the number of moves stored in legalMoveArray. In generating the list of legal moves, you should assume that castling moves or en passant pawn captures cannot occur. Remember that it is not legal to make a chess move which places or leaves the moving side's king in check. If the sideToMove has been checkmated and cannot move, LegalChessMoves should return zero.

This month brings one change to the rules of the contest. From now on, with apologies (and sympathies) to any MacPlus users still out there, the 68020 code generation option will be turned ON. This Challenge will be scored using the THINK C compiler and 68K instruction set, but future Challenges will include occasional use of the CodeWarrior compiler and/or the PowerPC instruction set. This month, you should also include the following pragmas in your code:

```#pragma options (mc68020, !mc68881, require_protos)
#pragma options (pack_enums, align_arrays)

```

Have fun, and e-mail me if there are any questions.

## Two Months Ago Winner

I guess most people spent the beginning of April working on their taxes instead of the Stock Market Database Challenge because I only received 3 entries. Of those, only two worked correctly. Despite the lack of competition, I’m happy to say that the winning solution is quite good. Congratulations to Xan Gregg (Durham, NC) for his efficient solution. And thanks to Ernst Munter for taking the time to enter. Ernst was at a bit of a disadvantage, considering he had to develop his code on a DOS-based machine that didn’t have the RAM or disk space specified in the problem.

Here are the times and code sizes for both entries. Numbers in parens after a person’s name indicate that person’s cumulative point total for all previous Programmer Challenges, not including this one:

Name time code

Xan Gregg (4) 3523 1766

Ernst Munter (53) 61714 3470

The key to implementing a fast database where not everything fits into RAM is to have fast RAM-based indexes to your disk-based data and to minimize disk accesses. Also, for those times when you do read/write to the disk it’s really important to do it in even sector amounts. Xan uses 8K reads/writes. Sectors on most devices are 512 bytes each so 8K is a good choice. If your application ever needs to swap data to disk then you should study Xan’s code. It could save your users a lot of time.

## Top 20 Contestants Of All Time

Here are the Top 20 Contestants for the 34 Programmer’s Challenges to date. The numbers below include points awarded for this months’ entrants. (Note: ties are listed alphabetically by last name - there are 24 people listed this month because 7 people have 20 points each.)

1. Boonstra, Bob 176

2. Karsh, Bill 71

3. Stenger, Allen 65

4. Munter, Ernst 63

6. Riha, Stepan 51

7. Goebel, James 49

8. Cutts, Kevin 46

9. Nepsund, Ronald 40

10. Vineyard, Jeremy 40

11. Darrah, Dave 34

12. Mallett, Jeff 34

13. Landry, Larry 29

14. Elwertowski, Tom 24

15. Gregg, Xan 24

16. Kasparian, Raffi 24

17. Lee, Johnny 22

18. Anderson, Troy 20

19. Burgoyne, Nick 20

20. Galway, Will 20

21. Israelson, Steve 20

22. Landweber, Greg 20

23. Noll, Bob 20

24. Pinkerton, Tom 20

There are three ways to earn points: (1) by scoring in the top 5 of any challenge, (2) by being the first person to find a bug in a published winning solution or, (3) being the first person to suggest a challenge that I use. The points you can win are:

1st place 20 points

2nd place 10 points

3rd place 7 points

4th place 4 points

5th place 2 points

finding bug 5 points

suggesting challenge 2 points

Here is Xan’s winning solution:

```#include <OSUtils.h>
#include <Memory.h>
#include <Files.h>

/* OVERVIEW  market.c - by Xan Gregg
I cache all symbol names in memory and as many blocks
of trade data from disk as possible are cached in the rest
of the allowed memory.  For each symbol I keep a “pointer”
(block# and entry#) to the most recent trade involving that
symbol.

The header includes an array of 26K entries in which each
entry points to a list of symbols.  All symbols with the
same first three letters are on the same list.  So the array
of symbol lists is indexed by the first three letters.

The trade data are stored on disk as a summary of the trade
information passed to NewTrade().  The time is stored in
a long, and the volume is stored as a daily cummulative
value.  The data is accumulated into a 8K block which
is written to disk when it gets full.

I know that there will be under 500,000 trades (since
the trade is at most 10MB and each Trade struct is 22
bytes).  And I have been told there will be about 10,000
symbols and at most 16K.  So that puts each symbol at
an average of 50 trades each.  That’s good for my approach
of indexing by the symbol name.  However, since I iterate
through the list of trades in reverse order, I am at a
disadvantage if a lot of older data is requested.

*/

typedef unsigned char uchar;
typedef unsigned short  ushort;
typedef unsigned long ulong;

typedef struct TimeStamp {
uchar  yearsFrom1900;
uchar  month;
uchar  day;
uchar  hour;
uchar  minute;
uchar  second;
} TimeStamp;

typedef char Str7[8];

Str7   symbol;
TimeStamptime;
Fixed  price;
ulong  numShares;

Fixed PriceIs(void *privateDataPtr, Str7 symbol, TimeStamp time);
ulong VolumeIs(void *privateDataPtr, Str7 symbol, TimeStamp time);

#define kBlockSize  8192L
#define kBlockEntries   (kBlockSize/16)
#define kFileSize   (8*1024L*1024L)
/* enough to store 500,000 trades */
#define kNumBlocks  1024L

#define kNumSymbolIndices (26*32*32L)
#define kSecondsPerDay  (60L*60L*24)

typedef struct SymbolEntry SymbolEntry;

struct SymbolEntry
{
long        restOfSymbol;   /* last 4 chars */
SymbolEntry *next;          /* with same 1st 3 chars */
short       latestBlockNum; /* location on disk */
short       latestEntryNum; /* location with block */
};

/* 16-byte struct stored on disk for each trade */
typedef struct
{
ulong   seconds;      /* seconds since 1904 */
Fixed   price;        /* same as from Trade record */
ulong   totalShares;  /* current and previous */
short   prevBlockNum;
short   prevEntryNum;

typedef struct
{
short      blockNum;   /* where it is on disk */
short   filler;
} CachedBlock;

typedef struct
{
CachedBlock  *blockLocation[kNumBlocks]; /* 4KB */
Ptr          symbolDataEnd;
CachedBlock  *lowestBlockP;
CachedBlock  *highestBlockP;
CachedBlock  *oldestBlockP;
CachedBlock  *currentOutBlockP;
short        currentEntryNum;
short        refNum;
ParamBlockRec pb;
ushort       symbolIndex[kNumSymbolIndices]; /* 26KB */
SymbolEntry  symbols[1]; /* variable length */

/* the above struct takes less than 32K, and the
symbol data takes less than 192K (assuming a max of
16K symbols), so the cached blocks can use everything
after the first 224K */

#define gBlockLocation      dataP->blockLocation
#define gSymbolDataEnd      dataP->symbolDataEnd
#define gLowestBlockP       dataP->lowestBlockP
#define gHighestBlockP      dataP->highestBlockP
#define gOldestBlockP       dataP->oldestBlockP
#define gCurrentOutBlockP   dataP->currentOutBlockP
#define gCurrentEntryNum    dataP->currentEntryNum
#define gRefNum             dataP->refNum
#define gPB                 dataP->pb
#define gSymbolIndex        dataP->symbolIndex
#define gSymbols            dataP->symbols

{
CachedBlock *blockP;

maxRAM = maxRAM & -4L;  /* make sure end is aligned */
if (dataP == 0)
DebugStr(“\p NO MEM”);

/* skip the first symbol as 0 is not a valid index */
gSymbolDataEnd = (Ptr) (gSymbols + 1);

/* Initialize memory blocks at end of data area. */
blockP = (CachedBlock *) (((Ptr) dataP) + maxRAM);
gCurrentOutBlockP = blockP - 1;
/* leaving 224K for headers and symbols */
while ((Ptr) (blockP - 1) > ((Ptr) dataP) + 224*1024L)
{
blockP-;
blockP->blockNum = -1;
}
gLowestBlockP = blockP;
gHighestBlockP = gCurrentOutBlockP;
gOldestBlockP = gHighestBlockP - 1;
gCurrentOutBlockP->blockNum = 0;
gBlockLocation[0] = gCurrentOutBlockP;

{ /* create swap file */
OSErr   err;
long    size;
err = Create(“\pXansSwapFile”, 0, ‘xxxx’, ‘DATA’);
if (err)
{
FSDelete(“\pXansSwapFile”, 0);
err = Create(“\pXansSwapFile”, 0, ‘xxxx’, ‘DATA’);
if (err)
DebugStr(“\p NO FILE”);
}
FSOpen(“\pXansSwapFile”, 0, &gRefNum);
if (gRefNum == 0)
DebugStr(“\p NO FILE”);
size = kFileSize;
err = AllocContig(gRefNum, &size);
size = kFileSize;
if (err)
err = Allocate(gRefNum, &size);
if (err)
DebugStr(“\p NO FILE”);
SetEOF(gRefNum, kFileSize);
}
return (void *) dataP;
}

/* Take a chance and use OS trap here.  If assembly
were allowed could at least cache the address of the
code and call it with a function pointer instead of
through a trap, or we could just write this whole
routine is assembly.
*/
ulong timeToSeconds(TimeStamp *timeP)
{
DateTimeRec dateTime;
ulong       seconds;

dateTime.year = 1900 + timeP->yearsFrom1900;
dateTime.month = timeP->month;
dateTime.day = timeP->day;
dateTime.hour = timeP->hour;
dateTime.minute = timeP->minute;
dateTime.second = timeP->second;
Date2Secs(&dateTime, &seconds);
return seconds;
}

{
register long           rest;
register SymbolEntry    *symbolP;
long        memRest;
short       keyIndex;
char        secondChar;
char        thirdChar;
char        *p;
short       len = symbol[0];

/* figure the keyIndex (first three letters) */
if (len < 2)
{
secondChar = 0;
thirdChar = 0;
}
else
{
secondChar = symbol[2] - ‘@’;
if (len != 2)
thirdChar = symbol[3] - ‘@’;
else
thirdChar = 0;
}
keyIndex = ((symbol[1] - ‘A’) << 10)
| (secondChar << 5) | thirdChar;

/* and the ‘rest’ (last four letters) */
memRest = 0;
p = (char *) &memRest;
while (len > 3)
*p++ = symbol[len-];

rest = memRest;
if (gSymbolIndex[keyIndex] == 0)
symbolP = 0;
else
{
symbolP = &gSymbols[gSymbolIndex[keyIndex]];
while ((symbolP != 0)
&& (symbolP->restOfSymbol != rest))
symbolP = symbolP->next;
}
return symbolP;
}

/* like findSymbol, but inserts it if necessary */
Str7 symbol)
{
register long           rest;
register SymbolEntry    *symbolP;
long        memRest;
short       keyIndex;
char        secondChar;
char        thirdChar;
char        *p;
short       len = symbol[0];

/* figure the keyIndex (first three letters) */
if (len < 2)
{
secondChar = 0;
thirdChar = 0;
}
else
{
secondChar = symbol[2] - ‘@’;
if (len != 2)
thirdChar = symbol[3] - ‘@’;
else
thirdChar = 0;
}
keyIndex = ((symbol[1] - ‘A’) << 10)
| (secondChar << 5) | thirdChar;

/* and the ‘rest’ (last four letters) */
memRest = 0;
p = (char *) &memRest;
while (len > 3)
*p++ = symbol[len-];

rest = memRest;
if (gSymbolIndex[keyIndex] == 0)
{  /* this is the first symbol with this key */
symbolP = (SymbolEntry *) gSymbolDataEnd;
gSymbolIndex[keyIndex] =
(ushort) (symbolP - gSymbols);
gSymbolDataEnd += sizeof(SymbolEntry);
symbolP->restOfSymbol = rest;
symbolP->next = 0;
symbolP->latestBlockNum = -1;
}
else
{  /* search the list for our last four letters */
symbolP = &gSymbols[gSymbolIndex[keyIndex]];
while ((symbolP->next != 0) &&
(symbolP->restOfSymbol != rest))
symbolP = symbolP->next;
if (symbolP->restOfSymbol != rest)
symbolP->next = (SymbolEntry *) gSymbolDataEnd;
symbolP = symbolP->next;
gSymbolDataEnd += sizeof(SymbolEntry);
symbolP->restOfSymbol = rest;
symbolP->next = 0;
symbolP->latestBlockNum = -1;
}
}
return symbolP;
}

/* returns a pointer to a block in memory.  If the
block is not already in memory, it is loaded from disk. */
{
CachedBlock     *blockP;

blockP = gBlockLocation[blockNum];
if (blockP == 0)
{  /* need to load it from disk */
if (gOldestBlockP->blockNum >= 0)
gBlockLocation[gOldestBlockP->blockNum] = 0;
gOldestBlockP->blockNum = blockNum;
| (1 << 5); /* don’t cache */
* kBlockSize;
gBlockLocation[blockNum] = gOldestBlockP;

/* find the next oldest block */
if (gOldestBlockP == gLowestBlockP)
gOldestBlockP = gHighestBlockP;
else
gOldestBlockP-;
if (gOldestBlockP == gCurrentOutBlockP)
if (gOldestBlockP == gLowestBlockP)
gOldestBlockP = gHighestBlockP;
else
gOldestBlockP-;
if ((gPB.ioParam.ioResult > 0)
&& (((Ptr) gOldestBlockP->data)
== gPB.ioParam.ioBuffer))
if (gOldestBlockP == gLowestBlockP)
gOldestBlockP = gHighestBlockP;
else
gOldestBlockP-;
if (gOldestBlockP == gCurrentOutBlockP)
if (gOldestBlockP == gLowestBlockP)
gOldestBlockP = gHighestBlockP;
else
gOldestBlockP-;
/* wait for read to complete */
;
}
return blockP;
}

{
CachedBlock *p;

/* make sure any previous write is done */
while (gPB.ioParam.ioResult > 0)
;
gPB.ioParam.ioRefNum = gRefNum;
gPB.ioParam.ioBuffer = (Ptr) gCurrentOutBlockP->data;
gPB.ioParam.ioReqCount = kBlockSize;
gPB.ioParam.ioPosMode = fsFromStart;
gPB.ioParam.ioPosOffset =
((long) gCurrentOutBlockP->blockNum) * kBlockSize;
PBWrite(&gPB, true);

/* find the next oldest block */
p = gOldestBlockP;
if (gOldestBlockP == gLowestBlockP)
gOldestBlockP = gHighestBlockP;
else
gOldestBlockP-;
if (gOldestBlockP == gCurrentOutBlockP)
if (gOldestBlockP == gLowestBlockP)
gOldestBlockP = gHighestBlockP;
else
gOldestBlockP-;
gCurrentOutBlockP = p;
}

{
ulong           seconds;
SymbolEntry     *symbolP;

if (gCurrentEntryNum == kBlockEntries)
{  /* current block is full, so write it out */
short   curBlockNum = gCurrentOutBlockP->blockNum;

writeCurrentBlock(dataP);
gCurrentEntryNum = 0;
if (gCurrentOutBlockP->blockNum >= 0)
gBlockLocation[gCurrentOutBlockP->blockNum] = 0;
gCurrentOutBlockP->blockNum = curBlockNum + 1;
gBlockLocation[gCurrentOutBlockP->blockNum] =
gCurrentOutBlockP;
}
if (symbolP->latestBlockNum >= 0)
{
CachedBlock *blockP;
ulong       todaySeconds;

todaySeconds = seconds - (seconds % kSecondsPerDay);
blockP = getBlock(dataP, symbolP->latestBlockNum);
}
symbolP->latestBlockNum = gCurrentOutBlockP->blockNum;
symbolP->latestEntryNum = gCurrentEntryNum;
gCurrentEntryNum++;
}

Fixed PriceIs(void *privateP, Str7 symbol, TimeStamp time)
{
ulong       seconds;
SymbolEntry *symbolP;

seconds = timeToSeconds(&time);
symbolP = findSymbolEntry(dataP, symbol);
if (symbolP)
{
CachedBlock     *blockP;

/* look for the most recent trade that is before
or on the requested time */
blockP = getBlock(dataP, symbolP->latestBlockNum);
{
return 0;
}
}
else
return 0;
}

ulong VolumeIs(void *privateP, Str7 symbol, TimeStamp time)
{
ulong       seconds;
SymbolEntry *symbolP;
ulong       todaySeconds;

seconds = timeToSeconds(&time);
todaySeconds = seconds - (seconds % kSecondsPerDay);
symbolP = findSymbolEntry(dataP, symbol);
if (symbolP)
{
CachedBlock     *blockP;

/* look for the most recent trade that is before
the requested time and on the same day */
blockP = getBlock(dataP, symbolP->latestBlockNum);
{
return 0;
}
return 0;
else
}
else
return 0;

}
```

Community Search:
MacTech Search:

Capto 1.2.9 - \$29.99
Capto (was Voila) is an easy-to-use app that takes capturing, recording, video and image editing to the next level. With an intelligent file manager and quick sharing options, Capto is perfect for... Read more
Opera 51.0.2830.40 - High-performance We...
Opera is a fast and secure browser trusted by millions of users. With the intuitive interface, Speed Dial and visual bookmarks for organizing favorite sites, news feature with fresh, relevant content... Read more
GarageSale 7.0.13 - Create outstanding e...
GarageSale is a slick, full-featured client application for the eBay online auction system. Create and manage your auctions with ease. With GarageSale, you can create, edit, track, and manage... Read more
1Password is a password manager that uniquely brings you both security and convenience. It is the only program that provides anti-phishing protection and goes beyond password management by adding Web... Read more
Evernote 7.0.1 - Create searchable notes...
Evernote allows you to easily capture information in any environment using whatever device or platform you find most convenient, and makes this information accessible and searchable at anytime, from... Read more
MacUpdate Desktop 6.2.0 - \$20.00
MacUpdate Desktop brings seamless 1-click app installs and version updates to your Mac. With a free MacUpdate account and MacUpdate Desktop 6, Mac users can now install almost any Mac app on... Read more
HoudahSpot is a versatile desktop search tool. Use HoudahSpot to locate hard-to-find files and keep frequently used files within reach. HoudahSpot will immediately feel familiar. It works just the... Read more
EtreCheck 4.0.4 - For troubleshooting yo...
EtreCheck is an app that displays the important details of your system configuration and allow you to copy that information to the Clipboard. It is meant to be used with Apple Support Communities to... Read more
WhatsApp 0.2.8361 - Desktop client for W...
WhatsApp is the desktop client for WhatsApp Messenger, a cross-platform mobile messaging app which allows you to exchange messages without having to pay for SMS. WhatsApp Messenger is available for... Read more
iClock is a menu-bar replacement for Apple's default clock but with 100x features. Have your Apple or Google calendar in the menubar. Have the day, date, and time in different fonts and colors in the... Read more

## Latest Forum Discussions

All the best games on sale for iPhone an...
Hi there, and welcome to our round up of all the best games that are on sale for iOS at the moment. It's not a vintage week in terms of numbers, but I'm pretty sure that every single one of these is worth picking up if you haven't already played... | Read more »
Disc Drivin' 2 Guide - Tips for the...
We're all still playing quite a bit of Disc Drivin' 2 over here at 148Apps, and we've gotten pretty good at it. Now that we've spent some more time with the game and unlocked more powerups, check out some of these more advanced tips: | Read more »
Alto's Odyssey Guide - How to Tackl...
Alto’s Odyssey is a completely stunning and serene runner, but it can also be a bit tricky. Check out these to try and keep your cool while playing this endless runner: Don’t focus too much on tasks [Read more] | Read more »
Here's everything you need to know...
Alto's Odyssey is a really, really good game. If you don't believe me, you should definitely check out our review by clicking this link right here. It takes the ideas from the original Alto's Adventure, then subtly builds on them, creating... | Read more »
Alto's Odyssey (Games)
Alto's Odyssey 1.0.1 Device: iOS Universal Category: Games Price: \$4.99, Version: 1.0.1 (iTunes) Description: Just beyond the horizon sits a majestic desert, vast and unexplored. Join Alto and his friends and set off on an endless... | Read more »
Vainglory 5v5: Everything you need to kn...
Check out these 5 games that are a lot l...
So you're in love with Minecraft, but you're looking for something else to play as well? You've come to the right place then, because this list is all about games that are a bit like Minecraft. Some of them, more than others. [Read more] | Read more »
Our top 5 characters from casual RPG Cre...
Creature Quest definitely lives up to its name with a host of collectible creatures based on fantasy tales and world mythologies. To celebrate Creature Quest’s first birthday, we’re going to lay out what we think are the five best characters in the... | Read more »
Around the Empire: What have you missed...
Did you know that Steel Media has a whole swathe of other sites dedicated to all aspects of mobile gaming? Sure you'll get the very best iPhone news, reviews, and opinions right here at 148Apps, but we don't want you missing out on a single piece... | Read more »
All the best games on sale for iPhone an...
Oh hi there, and welcome to our round-up of the best games that are currently on sale for iPhone and iPad. You thought I didn't see you there, did you, skulking behind the bushes? Trust me though, the bushes aren't where the best deals are. The... | Read more »

## Price Scanner via MacPrices.net

Apple Canada offers 2017 21″ and 27″ iMacs fo...
Canadian shoppers can save up to \$470 on the purchase of a 2017 current-generation 21″ or 27″ iMac with Certified Refurbished models at Apple Canada. Apple’s refurbished prices are the lowest... Read more
9″ iPads available online at Walmart for \$50...
Walmart has 9.7″ Apple iPads on sale for \$50 off MSRP for a limited time. Sale prices are for online orders only, in-store prices may vary: – 9″ 32GB iPad: \$279.99 \$50 off – 9″ 128GB iPad: \$379.99 \$... Read more
15″ Apple MacBook Pros, Certified Refurbished...
Save \$360-\$420 on the purchase of a 2017 15″ MacBook Pro with Certified Refurbished models at Apple. Apple’s refurbished prices are the lowest available for each model from any reseller. An standard... Read more
Amazon restocks MacBook Pros with models avai...
Amazon has restocked 15″ and 13″ Apple MacBook Pros with models on sale for up to \$251 off MSRP. Shipping is free. Note that stock of some Macs may come and go (and some sell out quickly), so check... Read more
Lowest price of the year: 15″ 2.8GHz Apple Ma...
Amazon has the 2017 Space Gray 15″ 2.8GHz MacBook Pro on sale today for \$251 off MSRP. Shipping is free: – 15″ 2.8GHz Touch Bar MacBook Pro Space Gray (MPTR2LL/A): \$2148, \$251 off MSRP Their price is... Read more
Apple restocks full line of Certified Refurbi...
Apple has restocked a full line of Apple Certified Refurbished 2017 13″ MacBook Pros for \$200-\$300 off MSRP. A standard Apple one-year warranty is included with each MacBook, and shipping is free.... Read more
Lowest sale price available for 13″ 1.8GHz Ma...
Focus Camera has the 2017 13″ 1.8GHz/128GB Apple MacBook Air on sale today for \$829 including free shipping. Their price is \$170 off MSRP, and it’s the lowest price available for a current 13″... Read more
21-inch 2.3GHz iMac on sale for \$999, \$100 of...
B&H Photo has the 2017 21″ 2.3GHz iMac (MMQA2LL/A) in stock and on sale for \$999 including free shipping plus NY & NJ tax only. Their price is \$100 off MSRP. Read more
Apple refurbished Mac minis in stock again st...
Apple has restocked Certified Refurbished Mac minis starting at \$419. Apple’s one-year warranty is included with each mini, and shipping is free: – 1.4GHz Mac mini: \$419 \$80 off MSRP – 2.6GHz Mac... Read more
Tuesday MacBook Deals: \$250 off 15″ 2.9GHz Ma...
Adorama has the Silver 15″ 2.9GHz Apple MacBook Pro on sale today for \$250 off MSRP. Shipping is free, and Adorama charges sales tax for residents in NY & NJ only: – 15″ 2.9GHz Silver MacBook Pro... Read more

## Jobs Board

*Apple* Retail - Multiple Positions - Apple,...
Job Description:SalesSpecialist - Retail Customer Service and SalesTransform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
*Apple* Retail - Multiple Positions - Apple,...
Job Description: Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
*Apple* Solutions Consultant - Apple (United...
# Apple Solutions Consultant Job Number: 113523441 Orange, CA, California, United States Posted: 21-Feb-2018 Weekly Hours: 40.00 **Job Summary** Are you passionate Read more
*Apple* Retail - Multiple Positions - Apple,...
Job Description:SalesSpecialist - Retail Customer Service and SalesTransform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
Sr. Experience Designer, Today at *Apple* -...
# Sr. Experience Designer, Today at Apple Job Number: 56495251 Santa Clara Valley, California, United States Posted: 18-Jan-2018 Weekly Hours: 40.00 **Job Summary** Read more