On Thursday, July 30th, 2020, we created the twitter account for FindTreasure.app, and made its first tweet:
What followed was an interesting 24 hour journey of making sure the game was a success.
During this time, we learnt a few things about User Behavior and Developer mistakes we think are worth sharing.
While building, we considered that a Contestant can create multiple accounts, and run parallel instances of their script, with different JWTs obtained when creating those accounts, giving themselves an advantage over others. …
I got a Dell XPS 15 Laptop recently. It is a thing of beauty, except when the Touchpad just stops responding, and only click-and-drag mode seems to work, so I have to restart the Computer to get it working again.
Restarting every time is a terrible solution, so I began to check what else I could do to fix this.
I found that disabling and enabling the “HID-compliant Touch Pad” device in Device Manager, fixed the problem every time.
Let’s play a speculation game.
Imagine you’re tasked to scale a tailor shop to provide same-day sewing and pickup of any dress.
How would you do it?
Note: It should support Owambe dresses with the most custom fittings.
It’s a compound problem, made up of some really complex problems people have been solving for decades.
Should be fun.
I’m incredibly naive about sewing, and most of the above topics, so feel free to not take me seriously.
The goal is clearly defined. A customer needs to be able to walk into the shop, order a dress made, and get it in 24 hours. …
I remember the way her voice rang out when she was excited.
I loved how excited she got when talking about the things she was passionate about.
She visited a few days after Olowo Gbogboro came out, and it was all she could talk about. Apparently, she’d stayed up until it came out, and she wrote about it on her blog asap, a post which got a then astonishing number of views in a short period.
Her Facebook was always bubbling with activity. She was quirky, fun, and could have serious conversations on a broad range of topics.
Esther was a Christian and proud of it. She’d go to Church with her Bible in hand and sing in the choir. She’d find a good Church when she was in a new community. We’d have conversations about Jesus, Christianity, Church History and more. Here’s one of her last articles about Cultivating strong Christian Friendships. …
The Romans had a deity called Janus, a two-headed figure who could look into the future and the past at the same time. He was the god of door-ways and decision-making, and it is for him, that the month of January gets its name.
I’m at a point in my life, where I find myself almost a spectator of my own history. I think I’ve always sucked at making big decisions. I either try to delay it till I can’t anymore, or choose an option with a decision making process that may as well be rolling a die.
I feel like I’ve been really lucky with my decisions. They’ve turned out well mostly, and so it’s easy to fall into a lull, thinking all will be well without proper planning. …
It used to be that EF Core would ignore computed columns, but in dotnet core 3.0, I have to conditionally add my computed columns to the model builder.
.Property(bl => bl.Age)
For performing a DB Migration at runtime, I used to think
EnsureCreated(…) and its async
EnsureCreatedAsync(…) counterpart would only create the database if it does not exist. However, it will actually perform a migration, if the database did not previously exist, and do absolutely nothing if the DB exists already.
I also noticed it does not work well with MySql via Pomelo, which prefers the more descriptive
Today, I faced the nastiest bug 🐜 in my code, when upgrading a Web API project from 2.2. to 3.0.
The API response was consistently an MS Excel file, no matter what the request’s Accept header was.
I knew the API had multiple output formatters, and it worked well in 2.2, so what could be wrong? My MVC setup in my Startup.cs looked like:
You might have noticed that
Mykeels.ExcelOutputFormatter is first added to the
OutputFormatters property in the MVC options.
This turned out to be the reason, and it was surprising because it was never a problem before.
You see, in asp.net 2.2, …
Like me, you might have injected a DBContext into your web app’s service provider with Startup.cs, and now need to create a new instance of it on the fly, because multi-threading.
Or you just need to create a new instance manually, for whatever reason.
await foreach (var image in query)
using (var _newContext = new MyDbContext(_context.Options))
_context is a
MyDbContext instance, injected into my constructor by the service provider.
You might have noticed I passed
_context.Options as an argument into
MyDbContext has the following constructor definition:
public MyDbContext(DbContextOptions<MyDbContext> options): base(options)
However, once created, an instance has no way to give back the options it was created with. …
I just installed .NET Core 3.0, and began trying it. However, running
nuget restore on my sln give the errors:
error NETSDK1045: The current .NET SDK does not support targeting .NET Standard 2.1
error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.0
global.jsonfile in the root of your project(s) directory:
I recently had to add audit fields to DB models, and make sure EF handled them automagically.
I wanted a
CreatedAt field that was a
DateTime, and a
CreatedBy field, that contained the
Guid of the user who was responsible for creating the model instance.
I also wanted similar
UpdatedAt , and
UpdatedBy fields. Nothing fancy.
It would also have been nice to be able to soft delete instances, rather than actually deleting them from the DB.
If it’s not clear, a soft delete marks a column like
IsDeletedas a boolean, so it still exists in the DB, but is not visible to the user. …