In a recent discussion on the forums someone said that “operator_convert acts like a constructor”.

It’s true, except when its not.

For instance, if you create a class that has an “operator_convert from” then you may be surprised at the behaviour.

So first, whats an “operator_convert from” ?

A class can have two forms of operator_convert.… Read the rest

Developers needs are not the same as consumers needs

There are lots of apps; desktop, web, and mobile. And they are for all kinds of needs for general consumption.

Developers needs often don’t fit that model though.

How many developers have IDE’s that the use on the Web ? Or on their mobile phone ? You might be able to write text there but if you using a tool like VS Code, Xcode, etc these are still mostly traditional desktop apps.… Read the rest

Is nil or = nil ?

Often in code you might see checks for NIL written as

if foo = nil then

and sometimes you might see

if foo is nil

Whats the difference between the two ?

In Xojo the IS operator compares the references. It doesn’t compare the contents of the objects in any way. It answers the question “do these two references refer to the exact same instance” – in some languages this would be comparing whether two pointers point to the same location.… Read the rest

Decide by not deciding

I was doing some reading on the weekend and came across some really good thoughts on how to make decisions in code – but not by using conventional if or select branching mechanisms or others that masquerade as flow control statements under other guises.

There’s a whole movement for “if-less programming”.

And it fits very well with using OOP and the capabilities of polymorphism in ways that make your code clearer and easier to maintain and extend.… Read the rest

Is Pro+ worth it ?

I’ve now had use of a Pro+ license for nearly a year.

When this license type was introduced Xojo told us that the Pro+ included

Top Priority Support is just as defined on that page, we’ll bump your support questions to the top of the queue and we’ll review your Feedback cases first. And of course you can set up a call with us anytime too.

Read the rest

Programming thought experiments

Some companies like to pose certain programming questions as part of their interview process.

I’ve run into a variety of these. They’ve been SQL related questions, code writing, and algorithm descriptions. Some were fairly straight forward. Some less so.

One of the best I heard was a series of “How would you write this code if you had to write it …” with varying restrictions put on things.… Read the rest

32 bit apps in a 64 bit era

MacOS has been fully 64 bit since the release of 10.7 (Lion) in 2011.

Yet is has continued to support running 32 bit apps up until the release of 10.15 (Catalina) which removes support for 32 bit apps entirely.

There are ways to work around this like running an old version of macOS in a VM.… Read the rest