How to fix bugs efficiently and effectively

Part of being an app developer is fixing bugs. That’s OK, all great developers create bugs.

BUT fixing bugs can take so much time that you feel you can never work on new features. There must be a better way, right?

Of course, we need to write testable code and actually write easy to maintain tests. I encourage you to read up about functionality tests (if you use Flutter, Unleash the full power of Flutter widget tests is a good start).

But, on the day you have to fix a bug, how can you do it efficiently and effectively?

In a nutshell, you would:

  • Investigate the bug
  • Ask someone else to reproduce if you can’t
  • Fix trivial bugs straight away
  • Use the creative power of your brain to help you generate ideas to fix non trivial bugs
  • Reflect after difficult bugs

10 minutes to investigate

Continue reading “How to fix bugs efficiently and effectively”

Inserting the same Flutter web app into different sections of your website

When I thought about the content for Design Your City, I faced a dilemma.

I had an idea for 4 tabs.

– “Learn” tab: content, should be picked up by search engines.
– “Discover” and “Design”: CAD tools
– “Account”: log in/out for the CAD tools

My requirements were like this:

A design mock up showing 4 tabs: Learn needs web content with SEO, discover, and design and account, need web app content (maps and login/out)

(Note: the website has slightly expanded now, with 6 tabs)

I knew from the official doc, and from my own experimentation with Flutter For Web on a previous project, that Flutter For Web is very well suited to make CAD tools, but not for SEO.

Continue reading “Inserting the same Flutter web app into different sections of your website”

Unleash the full power of Flutter widget tests

If you’re a Flutter developer, you may have written widget tests before. But have you unleashed their full power?

Judging by the Flutter developers I have worked with the last couple of years, I would venture it’s a “no”… Not because of lack of skills, I have worked with many excellent developers, but because best practices regarding testing take a little longer to establish when a framework is still “new”.
Continue reading “Unleash the full power of Flutter widget tests”

Being a software developer in 2020

As software developers, we learn all the time. New frameworks, new programming languages, new dev ops, the list seems endless. So, we often plan to catch up with X and Y, through online courses, videos, blog posts, asking a colleague etc. Many mention it when giving career advice. And I have done so myself up until the end of 2019.

But it’s different now. I believe that the best you can do for your career as a software developer in 2020 is to focus on climate change*. Reduce your meat and dairy consumption**. Talk about climate change with your family, friends, colleagues. Contact your local politicians and ask that they bring in legislation that keeps fossil fuels in the ground. Contact any organisation you are a member or customer of, and ask them to divest from fossil fuels.

I know, I know, I’m mostly talking about communication skills. And, as software developers, we’re not always too comfortable with those. So it’s a big ask.

“I’m worried I will get behind if I don’t learn framework X and all the other developers do.”

Continue reading “Being a software developer in 2020”

Software developers: the 5 minutes habit that will boost your workday

Do you ever get distracted at work? Yes, me too…

The problem

We get distracted. By someone, a live issue, a meeting, a colleague asking a quick question, a broken build pipeline, and so on. Reasons are plenty.

We forget “where we were”.

My solution

Every workday, I write an ordered list of tasks I will do at the start of the next workday.

My implementation

Just before logging off, I set aside 5 minutes.

This is useful to do this every workday. Don’t skip it. Particularly, don’t skip it on Friday at 5.30pm. I know you want to get out of the building, but stay 5 more minutes, you will thank yourself for it on Monday morning.

Continue reading “Software developers: the 5 minutes habit that will boost your workday”

Flutter widget tests: a practical example

When it comes to mobile apps, automated tests play a very important role in app maintenance. So, how do you write tests in Flutter?

As you would expect from a modern framework, Flutter offers both unit and integration tests. But it also offers something else: widget tests.

Widget tests are in between unit and integration. Like a unit test, they run on a simpler test environment (whereas integration tests run on an emulator or device). But they can actually test the UI. You can write a widget test that taps on a button.

With the Android SDK, I write UI tests with Espresso. It works well but the tests take a long time to run. It’s not a problem with CI, as we can use some good sharding libraries. But while I develop, I often run a subset on my local machine, to verify my work, and I get frustrated.

Therefore, I find the concept of widget tests very welcome. It will reduce the number of integration tests on a production app, moving some of them to widget tests.

In this code tutorial, we will create an app with a list page and a details page. On the details page, we can select/unselect an item. Its selected status is shown on the list page via a different background colour. 

Then,  we will write unit and widget tests to verify the behaviour of the app.

Continue reading “Flutter widget tests: a practical example”

How to implement gestures across several widgets in Flutter

Flutter makes creating custom UI experiences easy. It really does. I mean it.

One example is complex gestures. How about starting a drag gesture to trigger something, and then moving the finger to control something else, and finally dropping it to confirm?

Continue reading “How to implement gestures across several widgets in Flutter”

How to filter a list in AngularDart

A common pattern when showing a list on a website is allowing the users to filter it with a search term. So, how do you do this in AngularDart?

In this code tutorial, which uses AngularDart 5.0, we will create a simple web app with a list. Above the list, in a sibling component of the list, we will show an input field and a clear button. As the user types in the input, the list is filtered accordingly. If the user taps the clear button, all the items of the list are shown again and the input field is cleared.

The code is available on github.

Continue reading “How to filter a list in AngularDart”

Publishing my first iOS app with Flutter

A few weeks ago, I decided to publish my first Flutter app on the Apple app store. The app had been published on Android for almost a year, but I had actually never tested it on an iPhone. Did Flutter live up to its cross platform claims?

Here are a few things to consider & watch out for, especially if you come from an Android background.

Continue reading “Publishing my first iOS app with Flutter”

Creating flavors of a Flutter app (Flutter & Android setup)

It’s quite common for a native Android app to use productFlavors to set up several apps from the same source code. So, how easy is this to implement in Flutter?

In this code tutorial, we will set up a project with 2 app flavors. Each app will display the app name (specific per flavor), the current date (shared functionality, which includes a string), a short description (specific per flavor), and two images (one specific per flavor, one shared).

Continue reading “Creating flavors of a Flutter app (Flutter & Android setup)”