strategic career directions, 2014
why UChicago? short, clear answers for interviewers
swing xx topics
am fast as Wall St developer
maxmize weekends – as of Mar 2011
—— pearls ——
latency – additive
unary/binary operator overload
operator overload inheritance
why prepareStatement uses the connection object
https://draft.blogger.com/blogger.g?blogID=2394088294885094382 – pearl
https://draft.blogger.com/blogger.g?blogID=7653946442655307608 – tpytpy
https://draft.blogger.com/blogger.g?blogID=32423173 – 610610
(Avichal asked me …)
#1 of what I enjoy most – body-building. There are various elements that make it challenging, engaging, sustainable
* some value-add for the tech community
* relevant to immediate IV -and- value-add-for-employer, which translates to stable and hopefully rising income…
Example – high performance c++ on linux
* unlocking additional job markets
Example – c++, c#, swing, socket
Example – FX domain knowledge
Example – quant stuff
* Real insight gained only by in-depth study, overcoming a non-trivial entry barrier, and building a lead over competitors
Example – quant trading strategy
Example – threading, STL,
Example – insights into c#
Example – stat risk content, even though not really relevant to my interviews.
* strategic value to my competitive position
— http://msdn.microsoft.com/en-us/magazine/dd419663.aspx pointed out …
The INotifyPropertyChanged interface contains an event pseudo-field called PropertyChanged.
Whenever a property on a ViewModel object (or a Model object) has a new value, it can (should?) raise the PropertyChanged event to notify the WPF binding system. Upon receiving that notification, the binding system queries the property, and the bound property on some UI element receives the new value. I believe this is how new data hits the screen.
I believe the callbacks run on the UI thread, just like swing.
In order for WPF to know which property on the ViewModel object has changed, the PropertyChangedEventArgs class exposes a PropertyName property of type String. You must be careful to pass the correct property name into that event argument; otherwise, WPF will end up querying the wrong property for a new value.
For PropertyChanged to work, i think we have to use xaml binding with a prop name. In contrast, the alternative — defining ItemSource in codebehind probably doesn’t work.
Layout is one of the most important tasks of a GUI coder (as well as the artist). I get layout questions in my GUI job interviews. Despite all the advancement, veterans would probably agree layout is non-trivial. Both WPF and swing have tons of features on layout.
Swing layout is sometimes challenging/painful, esp. with window resizing. There are various advanced layout managers created to address the pains – gridbag etc.
http://killertilapia.blogspot.sg/2012/11/making-sense-of-wpf-layouts.html has some good pointers on wpf with references of swing –
* By default, WPF apps have a base Grid layout. Get rid of it and use “Dock Panel” as your base. Dock Panels are the same as swing Border layout. The idea is to place the menu on top (DockPanel.Dock=”Top”), status bar bottom (DockPanel.Dock=”Bottom”) and put a Grid at the center. Now you have a well-behaved desktop app that reacts well to window re-sizes.
* The Grid control is like Swing’s GridBagLayout only easier to use.
* Positioning — Use the AM (Alignment/Margin) to position elements in a container.
* Spacing — Use the margin + padding for spacing. If 2 buttons are side by side, don’t put a blank label in-between them to create space.
** In contrast, swing uses glue — http://docs.oracle.com/javase/tutorial/uiswing/layout/box.html#filler
http://wpftutorial.net/LayoutProperties.html has good pointers too —
– height/width — All controls provide a Height and Width but don’t fixed sizing.
** Set the Width and Height of elements to Auto whenever possible.
** For precise control, use the MinHeight, MaxHeight, MinWidth and MaxWidth properties to define a acceptable range.
Between the swing layer and OS layer, there are 2 interactions “channels”. In other words, swing relies on 2 services provided by
the “hotel service desk” that’s the OS.
A: upward -> screen update, targetting a particular screen object
B: downward -> keyboard/mouse events when user interacts with a screen object
In both domains, data/events are bound to individual screen/visual objects. Eech screen object maps to one (or more) swing object + one (or more) native object “protected” by the OS. Remember OS is the wrapper layer on top of hardware, and all access to hardware must go through the OS.
You encounter low-level details when digging into either of the 2 domains
A: painting, java 2D, UI delegates
B: event pumping, low-level vs semantic events.
cf swing AWTEventMulticaster …
All c# delegate types are multicast. The word “multicast” is /superfluous/redundant/, just like Reentrant in ReentrantLock. You can similarly say silly things like “Secure SSL”, or “Reliable TCP”.
According to http://msdn.microsoft.com/en-us/library/system.multicastdelegate.aspx, a MulticastDelegate has a linked list of delegates, known as an invocation list. When a multicast delegate is invoked, the delegates in the invocation list are called _synchronously_ in the order in which they appear.
http://blogs.msdn.com/b/brada/archive/2004/02/05/68415.aspx says ” We abandoned the distinction between Delegate and MulticastDelegate towards the end of V1.” Even though MulticastDelegate type extend Delegate type, system will not even allow you to derive from Delegate directly. Instead, all delegates extend MulticastDelegate.