Cherry MX Brown - Programmers' Switch
A lot of programmers like to use mechanical keyboards. The type of keyboards got better experiences on typing and more durable than the traditional membrane keyboard.
For mechanical keyboards, there are several different types of keyboards switches to choose. Each type of switch will give you a different typing experience. I have used the top 3 popular switches.
Firstly, I tried Cherry MX Blue. A lot of people call it "Typist Switch." It got a "clicky" sound when you are typing. But I found that it is noisy, and the keys are a bit "hard."
Secondly, I bought a keyboard with Cherry MX Red afterward. I like that. It has not the "clicky" sound, and the keys are much softer, more comfortable for typing. That is very good.
Recently, I bought a ducky keyboard with Cherry MX Brown. I found this type of switch is my most favorable switch. The keys are soft too, and it got a bit "clicky" sound, but not very noisy. I will award this type of switch the name, "Programmers' Switch."
Whether we need a physical office location
Yesterday, I had a chat in a law firm at Southside of Brisbane. I suggested they can provide some initial consultations online. They accepted my suggestions. After the conversation, I found a lot of professional service providers such as Accountants, lawyers, and property valuers, do not require a physical office location. Nowadays, a lot of things can do it online. The customers can make the inquiry online via email or Whatsapp. A lot of face to face meetings can reduce. The professionals can work from home too because they need a computer to work. We can communicate with our colleagues online. There are live chat tools, such as MS teams and slack.
Yes, they still need to meet the people in person. For example, you need to verify your customers' identity or witness their signature. Then we need a sort of co-working space to hire a meeting room. Of course, for colleagues, we need to have some team meeting activities, then we go to a restaurant or a coffee shop for this purpose. Yes, I know if you need to pair up someone for a project, for example, pair programming or brainstorming. That is better to work in the same physical location. Then the co-working space is the solution again. You can hire some hot desks in there.
I think the demand for co-working spaces will be increasing in the current trend, rather than the needs of an office.
The best practice to show or hide the element in Angular
In the past, AngularJS is using "ng-if" to control whether the div is show or hide. That is basic 101. In Angular, the syntax are changed, there are no more "ng-" somethings. Now, that is using somethings more similar with, [hidden]. So you can bind a variable with that to control the visibility of div.
Example:
Code
class="amc_code_even"> | | ||
|
Angular + Asp.net core identity is not easy, you need some custom claims
In Visual Sutdio 2019, Angular+ .net core identity is nearly done by a single click. But that is not easy if you wish to add extra custom claims. I have tried to used IdentityResource or IProfileService to config the Identity server at Startup.cs. That is not successful. That is easier to build own in this case. Mainly, you need to build login service by yourself.
At this stage, I believe the angular code can be reuse. I just need to config it to use my own login url.
Separating the routes in angular
I don't know why the default .net core angular template all routes in the app.modules.ts like this
Code
RouterModule.forRoot([ | |
{ path: '', component: HomeComponent, pathMatch: 'full' }, | |
{ path: 'counter', component: CounterComponent }, | |
{ path: 'fetch-data', component: FetchDataComponent }, | |
]) |
If you build more modules, then the codes will become quite unmanageable. This is not clean at all.
I suggest a better practice, to create app.routes.ts.
This like:
Code
export class AppRoutes { | |
getRoutes() { | |
return [ | |
{ path: '', component: HomeComponent, pathMatch: 'full' }, | |
{ path: 'counter', component: CounterComponent }, | |
| |
{ path: 'fetch-data', component: FetchDataComponent }, | |
]; | |
} | |
} |
Then in the app.modules.ts, it will import the routes
Code
let appRoutes = new AppRoutes(); | |
RouterModule.forRoot(appRoutes.getRoutes()) |
This approach is more clear


