knowledge.lapasa.net

Greater Toronto Area Flash Platform Developer Blog

  • Author: mlapasa
  • Published: Nov 15th, 2008
  • Category: Jobs
  • Comments: 2

There are good headhunters and then there are these…. (Part 2)

TAGS: None

I got a LinkedIn invite by a headhunter who I would refuse to do business with simply because of poor communication and research skills. Here is the invitation (mostly) in verbatim:
///////////////////////////////////////////////////////////////////////////////
Hi Mark,

Saw your profile online and wanted to contact you. Bob,

How are you sir? Had to connect with you. My name is O.K. [REPLACED FULL NAME WITH INITIALS], a senior IT recruiter with [COMPANY NAME OMITTED], Canada’s oldest and most successful IT consulting firm.

I know you are a Flex Developer at Parlay which is why I am contacting you. How would you consider a fabulous new opportunity as a Flex Developer with a stellar firm in Mississauga, doing just that.

I have an opportunity for you right now that meets your core competency schedule. I hope that first you will accept my invite so 2) we can discuss it as per your discretion and interest level.

Looking forward to hearing from you

O.K. [REPLACED FULL NAME WITH INITIALS]
IT recruiter
[COMPANY NAME OMITTED]
///////////////////////////////////////////////////////////////////////////////
I hope this is not a form letter because if it is, this person lacks the professionalism to prevent mass mistakes. Do you see Bob at the end of line 2? Who is Bob???

What then really got me boiled over was that it mentioned “I know you are a Flex Developer at Parlay”. Dude, you knew how to contact me through my LinkedIn profile but did not have the nerve to read my work experience properly. Currently, I do not work work at Parlay and when I did work at Parlay, I was doing Flash Development. Clearly a sign of poor research skills. They are not one in the same. It just might be the case that this person is probably getting the wrong candidates for the job as all they care about is filling the position. This person claims to be a Senior IT recruiter however this bodes poorly on the company as a whole. I suspect dealing with junior recruiters might fare worse.

For Part 1, have a gander at this:
http://knowledge.lapasa.net/2007/05/18/there-are-good-headhunters-and-then-there-are-these/

Notes: Working With Data Views

TAGS: None

Some notes I took while RTFM’ing. One begins to take for granted how sorting and filtering works after working with ArrayCollections for so long. Such write ups help me as a reference down the line. May be of help to you too.

Working With Data Views
===================

ArrayCollection/XMLListCollection have a ‘view’ property provided by the ICollectionView interface.

Data views feature:

- Modify the data view to show the data as sorted; without affecting the underlying data.

- Modify the data view to show a subset of items in the data; without affecting the underlying data.

- Traverse a collection using a ‘cursor’ pointer

- Save ‘bookmark’ the cursor positions

- Insert and delete items in the collection; which directly impacts the data.

- Access parts of data set that might become available at different times.

* Best practices is to work with the collection rather than a control’s dataprovider property that maps to that collection

Sorting and filtering data for viewing
===========================

[Sorting]

- “Data view operations have no effect on the underlying data object content, only on the subset of data that the collection view represents”

- Sort objects: Specify fields to be sorted (Using SortField); require results to be unique, or store custom sort functions to be used for ordering sorted output.

- Sort objects can be used to find items in a collection

* .refresh() is always required to see the results of the application of the sort.

[Filtering]

- Use filter function to filter a subset of the source data

- The function signature must take a single Object which will be a collection item. The functions return is Boolean, true if if the item in question is to be included in the view.

* .refresh() is always required to see the results of the application of the filtering.

Using a view cursor
===============

- A cursor indicates the current position of a particular target object in a data collection.

- To access a cursor, the collection has an createCursor() method that returns a view cursor of type IViewCursor.

seek(bookmark:CursorBookmark, offset:int = 0, prefetch:int = 0):void

Moves the cursor to a location at an offset from the specified bookmark.

“When you use standard Flex collection classes, ArrayCollection and XMLListCollection, you use the IViewCursor interface directly; as the following code snippet shows, you do not reference an object instance:

public var myAC:ICollectionView = new ArrayCollection(myArray);
public var myCursor:IViewCursor;
myCursor=myAC.createCursor();

Manipulating the view cursor
=====================

- Traversal forward: Always do a IViewCursor.afterLast:Boolean check to see if there exists an item in the collection to perform IViewCursor.moveNext().

/*******************************************************/
moveNext():Boolean
Moves the cursor to the next item within the collection.
/*******************************************************/

- Traversal backwards: Always do a IViewCursor.beforeFirst:Boolean check to see if there exists an item in the collection to perform IViewCursor.movePrevious().

/*******************************************************/
movePrevious():Boolean
Moves the cursor to the previous item within the collection.
/*******************************************************/

* The collection must have a Sort Object defined and .refresh declared before using the following search methods

/*******************************************************/
findAny(values:Object):Boolean
Finds an item with the specified properties within the collection and positions the cursor to that item.
/*******************************************************/

/*******************************************************/
findFirst(values:Object):Boolean
Finds the first item with the specified properties within the collection and positions the cursor to that item.
/*******************************************************/

/*******************************************************/
findLast(values:Object):Boolean
Finds the last item with the specified properties within the collection and positions the cursor on that item.
/*******************************************************/

- findAny() executes faster than findFirst() or findFast()

- “If the associated data is from a remote source, and not all of the items are cached locally, the find methods begin an asynchronous fetch from the remote source; if a fetch is already in progress, they wait for it to complete before making another fetch request.”

Getting, adding, and removing data items
===============================

/*******************************************************/
IViewCursor.current : Object
[read-only] Provides access the object at the location in the source collection referenced by this cursor.
/*******************************************************/

/*******************************************************/
IViewCursor.insert(item:Object):void
Inserts the specified item –BEFORE– the cursor’s current position.
/*******************************************************/

Note: If the collection has a sort applied, the object is inserted in a way that maintains the sort. Otherwise, the object is inserted where the cursor is in the collection.

/*******************************************************/
IViewCursor.remove():Object
Removes the current item and returns it.
/*******************************************************/

Removes the item the cursor is referencing then refers to the location after the removed item provided it is not the last item.

Using bookmarks
=============

1) Move the cursor to a location in the collection using findAny(), findFirst(), findLast(), moveNext(), movePrevious(), remove(), or seek()

2) Bookmark the current position

var myBookmark:CursorBookmark = myViewCursor.bookmark;

3) Do step 1) to move cursor around

4) To get back to the bookmark position, tell the cursor to seek the bookmark.

myViewCursor.seek(myBookmark);

© 2009 knowledge.lapasa.net. All Rights Reserved.

This blog is powered by Wordpress and Magatheme by Bryan Helmig.