Check if there is a circular reference by doing a production build, Sencha cmd will tell if there is a circular reference.
How to save time in implementing a new feature
Recently I have found that I could have been more efficient than how I was doing, my approach of diving straight into the code to implement the feature and then keep refining later works, but takes quite some time.
The problem is, every time I make a change, I have to test to make sure it doesn’t break anything, this caused me to test multiple times as I experimented to make my solution work. I have found that it would save more time if I do all the implementation first, then test.
It would save more time if I write down a list of test cases and mark each as done after I have tested. So I won’t forget what I have tested and can be sure that those cases work.
Also, if possible, write unit tests so tests can be executed automatically quickly in place of manual testing.
So I came up with the following flow, maybe it will be faster.
Connect from host to VM in VirtualBox and allow Internet in VM
In order to do this, setup 2 network adapters for the VM, first one use NAT so the VM has access to the Internet through the host.
The second adapter is set to Host-only.
in the VM, run ipconfig and use the IP address of the VM under the host-only network to access from the host.
Use the default gateway to access host from inside the VM
API Reference for NHibernate
While trying to figure out how a method in NHibernate works, I looked for the API Reference and couldn’t find it.
Turns out, NHibernate is a port of Hibernate for .NET framework, so you can find all the API reference in Hibernate API reference.
At least they could have included a link on their website, this probably wasted a lot of everyone’s time.
Create custom error pages in ASP.NET
Apparently there are lots of hoops you need to jump through to create custom error pages in ASP.NET
http://benfoster.io/blog/aspnet-mvc-custom-error-pages
The connection to the remote endpoint was terminated
Go to IIS manager, open the AppPool, Advanced settings -> enable 32 bit application
Might have to rebuild the app in visual studio, then try to reattach to the process
Techniques to troubleshoot issues
Isolation, if a large change was done that caused the issue, break the large change into smaller changes
Start with the previous working version, add changes one by one until one stops working to isolate the problem.
Redirect all http to https, remove unwanted http headers
Use IIS URL Rewrite module, install it first, then configure it either through the IIS Manager UI or web.config file.
https://blogs.msdn.microsoft.com/varunm/2013/04/23/remove-unwanted-http-response-headers/
Node is not found in Ubuntu
When running nodejs application on ubuntu
this is because the package manager named the application nodejs instead of node
make a symlink from nodejs to node and it should work
sudo ln -s /usr/bin/nodejs /usr/bin/node
VirtualBox Guest OS not recognizing extra space after VDI resize
if there are snapshots, merge back first before resizing
or resize all the snapshots plus the current vdi to same size, then delete the snapshots(might not need to delete?)