Tuesday, April 10, 2012

Scala - Memory Management

Since Scala runs on Java Virtual Machine, JVM’s garbage collect is responsible of clearing up Scala program’s memory when it becomes obsolete. At this note, we can say that Scala’s memory management schema is relatively the same as Java. Every time an object is instantiated at run-time, Scala reserves some memory to hold the objects states; which includes its variables. Memory leak is also being prevented from JVM’s run-time environment.
However, on a side note, since Scala comes with many powerful built-in functions (such as filter, mapping), developer might be using more memory that they needed. These functions often generates new objects which many costing additional memory usage. 

Monday, April 9, 2012

Scala - Objects

Now that we know something about Scala’s built-in type, let’s look at its objects. Objects in Scala are created in classes. Classes are like the skeleton to objects. As a companion to classes, singleton objects can be declared using the keyword ‘objects’. When a class and an object share the same name, they are companions to each other. In addition, they are able share each other’s member, including private members. Objects can be declared as ‘Traits’ in Scala as an alternative. ‘Traits’ is very similar to Java’s interface, however ‘traits’ can be implements solely.

Different from Java’s interface, traits can be ‘mix-in’ with other traits and classes when constructing methods. 

Sunday, April 8, 2012

Amazon Lockers - On site!

So, finally we drove down to Seattle, and arrived at the locker last Friday.

This is the screen in the middle of the lockers, where you input your pick-up code indicated in the pick-up confirmation email.

After the code is validated, locker number will be displayed in screen and that locker will pop open automatically. 

Yay, nice and smooth!

I would say it was definitely a great experience shipping to purchases to an Amazon locker. I am very glad that the timing worked out perfectly as it was my biggest concern at the beginning. 

Thursday, April 5, 2012

Poster Design - Final

Our idea is to promote a newly opened skateboard park in the city since project topic is Community. (Completely fictional!)
So after hours photoshopping, we had the final product!

After presentation, we had feedbacks on the figure not being 'rough' enough. Which I agree in my opinion. 
I love the typography and the hierarchy relationship among them. 
After all, it was a great experience in the process of making this project. 

Wednesday, April 4, 2012

Amazon Lockers - Delivery

Good news! my package is already delivered to the locker this morning!
I have been tracking my shipment, and as soon as its delivered, I received an email regarding the pick up information.
In the email there are:
  • Locker address and hours
  • Locker location details (mine is indicated to be in a packade, on level P2)
  • My locker pickup code 
  • A deadline before the package gets returned

The deadline was my biggest concern, I am glad that I have 5 days to pick up my package before it gets returned to Amazon.

Here are some time stamps so far:
Order placed on: March 29 (Thursday) around 2pm
Order shipped on:  April 2 (Monday) around 9am
Estimated delivery: April 4 (Wednesday)
Package delivered on: April 4 (Wednesday) around 11am
Last date to pick-up: April 9 (Monday) till location closes

Great! Can't wait to drive down to the states this weekend!

Read my previous posts about Amazon Lockers:

Tuesday, April 3, 2012

Scala - Type System

Scala inherited all built-in types from Java, such as String, Int, Char, Boolean. 
In fact, only a few new built-in data types are introduced. For instance, Scala’s Boolean type corresponds to Java’s Boolean type class. 
One interesting data type is ‘unit’. ‘Unit’ basically means nothing specially. If a function has a return value in type ‘unit’, it indicates that it is returning nothing, like the ‘void’ type in Java. Scala’s compiler is able to convert any return type to be a ‘unit’, to avoid this from happening, an equal sign ‘=’ should always be inserted after the function is declared. When any data type is converted to a ‘unit’ by the complier, its value will be lost. 
In the book Programming Scala, Dean Wampler states that “Scala allows you to decide whether a variable is immutable (read-only) or not (read-write) when you declare it.” 
Therefore, types do not need to be declared for neither immuatables nor mutables data; Scala is able to figure out which type in run- time. 

Monday, April 2, 2012

Amazon Lockers - Ordering

Ordering process is pretty much the same as how you would order item to your house.

During check out, just select the desire locker in the "Alternative Delivery Addresses"area:
 It should be listed right below your own Address Book.

There are 3 shipping options:

  1. Standard Locker Delivery
    • Free
    • 3-5 Business Days
  2. Two-Day Locker Delivery
    • Shipping Fee required depending on the number of items. 
  3. One-Day Locker Delivery
    • Shipping Fee required depending on the number of items

I went with the Standard Locker Delivery since I won't be down to the states till this Friday. 

Out of curiosity, I switched my shipping method to the Two-day and the shipping fee went from free to  ~$11, for two camera lens that worth ~$200. 

Mystery solved, then I switched back to the Standard.   I really hope Amazon can be more clear on the shipping cost, maybe displaying the cost when showing the different shipping options. 

Here are some time stamps so far:
Order placed on: March 29 (Thursday) around 2pm
Order shipped on:  April 2 (Monday) around 9am

It took them 2 days to ship my package out, which was completely acceptable and accurate since it clearly indicated that one of my item will need 1-2 days to process before I placed order. 

Hopefully my package will be there this weekend! Fingers crossed!