Category Archives: Development Notes

Software Engineering Placement Note

Last Update: 20 April 2015

VS Extensions
vsExtensions

C++ based

class Constructor (...) { }

Object is unavailable after the destructor has been started

class Destructor(...) { ... }

it is exceptional unsafe if two “new” statements putting next to others

Namings

should state what logic actions to perform

Comments

should mark down why you choose the solution and how you beat down the alternate that you come up with in mind. Also, mark down your coding intention of such logic actions and their possible outcomes / potential threats that might not be read directly from codes

it also suggest modularization for improving readibility, portability and robustness of the program

Function pointers

to be completed


Task: GMTDate Token 2/27

  • Forward Declaration (FD) is to reduce #include intrusive in header files ( .h )  when the size of class can be calculated by the compiler
  • the compiler need to know the exact sizeof a class including all its property objects (class member objects)
  • for class pointers(*) and references(&) no need for FD
    because they are fixed size (8 Bytes)

Coupling:
1st Troubles: friend function / class
2nd Troubles: Inheritance
3rd Troubles: Aggregation ( own an object )

Mac: Resolving Homebrew Postgresql 9.3 Error in Console

if you upgraded to Mac OS X 10.10 Yosemite, you probably encounter the message homebrew.mxcl.postgresql) Service only ran for 0 seconds. Pushing respawn out by 10 seconds in your console log.

restore

to fix the problem

ref: https://groups.google.com/forum/#!topic/uk.comp.sys.mac/8OjA_mSgCUs

also remember reload your pgsql process

see http://blog.55minutes.com/2013/09/postgresql-93-brew-upgrade/
This article helps you to migrate your pgsql 9.2 database to new 9.3 environment

How to Fix Notification Center Do Not Remember Settings in Yosemite

Screenshot 2014-10-25 17.48.07

Your settings in Notification Center in Yosemite has been disappeared after every time you reboot the machine? Good news there is a temporarily way to work around it from Apple Genius.

Step 1: Open the Library folder in your Home folder.
Step 2: In the Library folder, open the Application Support folder.
Step 3: Locate the folder named NotificationCenter. Drag this folder to the desktop.
Step 4: Next, open the Terminal application.
Copy and paste each line of these commands into the Terminal window, in order. Press return after each line:

Step 5: Close the Terminal app.
Step 6: Restart your computer.

However, Apple has lost its best quality assurance since iOS 7 and Mountain Lion

Reference: Dan Roesser: https://discussions.apple.com/thread/6605975

Windows: Simple Workaround for Installing Fonts without Admin Privilege

Tested in Windows Server 2008 Enterprise and Windows XP SP3
1. Download your favorite fonts from Internet
2. (UnZip if needed) Locate your xyz.ttf file
3. Open by double-click it (A font window pops out)
4. Change font type in your desired application (manually input it in setting)

Done!

The truth is that when you try to preview the font, Windows temporarily installed the fonts in order to render it.

A very smart hacking indeed.

Reference: http://superuser.com/a/118262

MongoDB launch on boot

Save the following as /Library/LaunchDaemons/org.mongo.mongod.plist

Enter the following in Terminal

original from Hunter Flod’s Blog