Unleashing the server developer in you

Back in 2016, when the idea that would become NewsWave was humming in my head, I was sipping my morning coffee while listening to an episode of Under the Radar. 

In that episode, Marco Arment and David Smith were discussing how they used servers to manage Overcast and Feed Wrangler. I was already considering using servers but after that I had decided.  

NewsWave Reader was the first app I developed that includes a server component, two years since release here are some of the learnings and experiences that can help if you’re planning to get into servers too. 

Depending on the app/service you want to create, using a server comes with many benefits: easily syncing devices, managing payments, providing a searchable repository of information, offloading data tasks from the device to the server, running ML models, crawling the web… 

Now, let me clarify something, if you do not need a server, do not use a server. They are overhead, they add another layer of complexity to take care of. Not only that but you’ll need to account for privacy (how much information should you store vs. not store), security (are you covering all the bases to avoid being hacked), scalability (how would your service handle exponential growth)… In addition to that, the more people use your app the more cost you’ll have, API call optimization is key. 

But what if you need to use a server, what if your new awesome idea for an app/service requires it. If that’s the case, I have great news, it really is not that hard.

Before starting any discussion on setup I’d suggest you to think about your business model. As I just mentioned, servers have cost, and the more users you have the more cost you’ll have. Make sure you have a business model that’s sustainable, and that’s easier said that done these days. I don’t say that lightly, during the first year of NewsWave I lost money almost every single month, be sure to learn from my mistakes. 

Once you have a solid business plan, what about the setup? As Marco suggested in his episode, if you’re an app developer you’re better off sticking with server-side ‘boring’ technologies: they are reliable, efficient and there’s plenty of documentation on the web. I could not be more thankful for his advice, my server stack is using what’s called LAMB: Linux, Apache, MySQL and PHP/Python. Let’s touch on each quickly:

Linux: I use the most solid and stable option possible: Debian. And when choosing what Debian version to use I went with the latest Long Term Release (at the time Debian 9), which gives me years of security updates before I need to update to the next major release.  

Apache: Old and trusted, it manages all my websites and web services. Plenty of documentation online, strengths and weaknesses are well known and very reliable. Also, it works easily with certbot for open source HTTPS free certification. 

MySQL: Here I was doubting between PostgreSQL and MySQL, both are reliable, scalable and heavily used in the industry. In the end I went with MySQL for the simple reason there was more documentation available in Linode (my host provider, more on that in a minute). 

PHP/Python/Pearl: I use a combination of PHP and Python: API’s are all PHP while internal server tasks and Machine Learning models are coded in Python. Again, plenty of documentation online, both languages widely used and not cutting edge. 

So let’s say you’ve decided to give it a go, you want to start experimenting, what are the next steps? How do you get started?

First you’ll need a host provider, someone that will host the server in a datacenter. There’s many options out there, I’ve been using Linode and am very happy with it. If you’re just getting started they have what’s called a nano plan for $5/month. 

Once you’ve signed up, you can easily create a new linode with the latest Debian 10 LTS and then… 

Screen Shot 2020 06 21 at 10 20 44

…just follow this instructions to get your server setup & secured with LAMB. Trust me, you’ll be up and running in no time. 

Once all is secured and installed, easily connect to it from your terminal and setup your SSH file editor of choice -I personally use terminal for mysql and all server maintenance and  Visual Studio Code for Python & PHP development-.

And that’s it, you’re good to go. From here you can start adding websites, training models, creating web services, adding crawlers, sky is the limit… If you mess up, just drop the server and start fresh. Backups are one click away as well, for when things are more solid and the option to rebuild does not look as enticing 🙂

– – –

Looking back I’m very happy to have gone this route, not only I could create NewsWave in the way I wanted but I’ve learned a ton. If you can I’d recommend listening to the Under the Radar episodes: into to servers and follow up questions

If you don’t need a server don’t get one, but if it will allow you to bring your idea to life, go for it. It looks a lot more scary than it is. 

Comments / questions?  You can reach me @MarcMasVi on Twitter.

Until next time, 


Working on new NLP projects

After shipping NewsWave for Mac, this last few weeks I’ve been playing around with two new NLP (natural language processing) projects. Each quite different from the other:

The first is targeted at the corporate world, its focus is in identifying new trends and winning themes based on RFP’s (requests for pricing) submitted by clients. This will be specially useful to help sales teams focus on the right requests & increase win rates.

The second one is about identifying sentiment & anger intensity in news / blog posts. This may translate into a NewsWave feature. Many outlets use anger to boost engagement, what if there’d be a way to keep that in check -while getting the content you need-? 

I’m having a blast with both, you never know with these projects, but I’m aiming to complete them by the end of July. I’ll keep you posted as things evolve. 

On another note, the release of NewsWave for Mac went well, I’m planning a longer post with more details about it. 

Until next time, 


Announcing NewsWave for Mac!

Without further ado, NewsWave for Mac is available on the Mac App Store.

Create your own timeline of stories by following your favorite feeds. Now from your iPhone, iPad or Mac.

Stacks image 307ce4a

What differentiates NewsWave?

– Twitter style timeline of your personalized content.

– Easily discover feeds through categories or catalogue search.

– Streamlined experience that makes browsing your stories fun & engaging.

What is the business model?

A premium subscription enables sync between your devices and allows unlimited content updates. It’s $ 9.99 / year.

The free version gets hourly updates and does not feature sync.

Can I try the synchronization between devices before I subscribe?

To keep accounts anonymous there is no personally identifiable information needed to create an account. The downside is that for NewsWave to know ‘you’ across devices it uses the subscription app purchase.

Where does the app idea come from?

It’s inspired by Brent Simmons, Marco Arment & Dave Winer.

I don’t like NewsWave

There’s other great alternatives out there, here’s a couple:

– NetNewsWire: https://ranchero.com/netnewswire/ 

– Reeder 4: https://reederapp.com

– Unread: https://www.goldenhillsoftware.com/unread/

I have feedback / Something does not work as expected

Feedback is welcome! Although I can’t reply to all emails I do read them all. Please do reach out at contact@mmvsolucions.com or hit me @MarcMasVi on Twitter.

– – – – –

I sincerely hope you’ll enjoy NewsWave. I have many ideas to keep improving it, will post here as development progresses.

Thanks & stay safe,


Creating a Digital Gardener | Home Automation – Raspberry Pi 4

Last December my wife and I flew to Europe to spend a couple of weeks with our overseas family. Although we live in a very safe neighborhood, for peace of mind, we wanted a way to check on our house while we were away.

There’s a couple of good commercial options, but they are a bit limited on what they do. So, I got myself a Raspberry 4, a couple sensors and a case and got to work. There’s a lot of great information online and I got a first digital guard prototype working quite quickly: 

IMG 4930

If the digital guard detected movement or any open doors it would start recording, open house lights, play sounds -pretending someone was in the house- and notify us. 

If everything was well, and nothing abnormal was detected, it would send a daily report with a picture of the house, inside temperature, humidity and more. Was the digital guard overkill? Likely… Fun to create & successful at its objective? Absolutely! 

Fast forward to a couple months ago and, due to the new COVID situation, my wife and I started getting into gardening.

We really liked adding plants to our garden, seeding, seeing the plants grow… One thing that sometimes was not as fun though was watering. Don’t get me wrong, its great when you want to do it, but having to do it daily can be tedious. Perfect excuse for a digital worker addition to the house: the digital gardener.  

As for the tools the worker would use, after doing some research I settled on two small sprinklers, connected using in-ground tubing and controlled by a solenoid valve. The valve, in turn, would be connected to a smart plug that was controlled by the Raspberry 4 through WiFi. 

IMG 3067

Assembly was quite straightforward. One thing I’d have loved someone told me: make sure you add quite a bit of sprinkler pipe thread seal tape in every connection. Specially on the ones that come before the solenoid valve acts. 

OK, now that I had everything ready to go I started working on the digital gardener itself. As a gardener would do, I wanted that every day it would assess how much water the plants needed. To allow him to do its job, the digital gardener needed the following information:

a) Did it rain today over my house? If so, how much?

b) What was the average temperature today?

c) How wet was the soil? 

Then, it should use that information to decide how much water the plants needed and start watering. Quick & easy.   

Translating to actual implementation:

1. In the Raspberry 4, crontab triggers the digital gardener (python script) every day at 8 p.m. 

2. The digital gardener pulls from OpenWeatherMap API the exact weather over my house using lat and long coordinates. 

3. It then decides the amount of time that it should water the plants for, or if it should water at all, based on rain and temperature specifics. 

4. It connects to the smart plug and turns it on, in turn this opens the solenoid valve and watering starts. 

5. Waits until the timer is up. 

6. Connects to the smart plug and turns it off, closing the solenoid and stopping watering. 

Throughout this process the worker is logging everything that is doing on a text file. I can then review what it did and tweak its behavior as needed. 

I also added a couple safety nets for when things could go wrong, if the connection to the smart plug fails when turning it on it will try again a couple of times before giving up. If it fails when turning it off it will keep trying every few minutes until it succeeds. 

And that’s it, I assembled the Raspberry inside an electrical box and placed it where it can act as a Digital Guard -if activated- and as a Digital Gardener -daily-. I’ve not yet soldered the components, excuse the electrical tape:

IMG 5622

And voila! Now we can go back to choosing the right lawn grass 🙂 

IMG 5611

– – – – – –

Today it’s been a very hot day for Palo Alto standards, 95 F. Do I need to remember to go out and water the plants? Of course not, the digital gardener has my back and will water the precise amount they need (unless I messed up the instructions, but that can always be fixed 🙂 ).

Until next time,


Designing the new NewsWave App Icon

One of the things I like about working on on-the-side projects is that I touch all aspects of them, this allows me to learn and grow many different skills. It’s so rewarding to learn about app development, server-side development, marketing, communication, design… 

And it’s the latter one I wanted to touch on for this post, specifically the NewsWave App Icon. Before we begin let’s clarify something very important: I’m not a Designer (as it will soon become aparent).

With that out of the way, lets see how the previous NewsWave for iOS icon looked like:



What defines success for an app icon you ask?

 – Should be easily recognizable on your iPhone home page & when it appears smaller for search or notifications. 

– Should look great when it appears in large size, like above. 

– Should work as a tab-bar icon (iOS) or a sideBar icon (Mac) with minor tweaks. 


The NewsWave 1.0 icon -shown above- met the objectives #1 and #3, but when it came to #2 it was decent at best. For the upcoming release of NewsWave for iOS & Mac I wanted to have an improved version, so I got to work…

I knew what I wanted to keep: the antenna metaphor and a color combination of blue & gray. I also knew what had to change: the antenna was bland, specially when seen at large sizes, and the icon did not translate well to the mac. 

The first thing I did was choose a picture I could use for inspiration, here’s the ‘cleaned’ one I settled for:

Screen Shot 2020 05 23 at 09 21 09

Once I had that, I worked on a first rough version of the icon:

Screen Shot 2020 05 23 at 09 23 12

and added background & other distinctive features:

Screen Shot 2020 05 23 at 09 24 50
As a first iteration I liked it OK, but it was quite bland. So, I started iterating with different gradients, antenna inclination angles, shadows, distinctive features…

After every iteration I would load it in the App bundles so I could see how they appeard on my Mac and on my iPhone. Would also look at how they looked when using Spotlight, notifications, etc… This step is critical because something that looks great at large size may look awful at small sizes. 

Here’s an example of another iteration, I knew it looked wrong but was difficult to know what to do to fix it. 

Screen Shot 2020 05 23 at 09 28 17

When you’re in this iteration circle, sometimes it can feel like you’re not moving forwards but backwards… Going for a walk or working on something else for a while helps big time. 

And after one of this walks it hit me, what if the icon represented an antenna at night pointing at the stars? This led a series of follow up decisions: removing borders, adding a representation of the ground, changing colors, adding new filters… And very quickly got to the final version, for Mac:

Screen Shot 2020 05 23 at 09 29 20


and for iOS:



I’m quite happy with how they turned out. At the same time I know there’s a lot that a full time designer would do better, and that’s one of things I love about this one-man-operation, you just keep learning & getting better. 

As for the software I used to create the icons, it’s “Pixelmator Pro” and I can’t recommend it enough. 

Comments / questions?  You can reach me @MarcMasVi on Twitter.

Until next time, 



Cliffski on Social Media

I have followed Cliffski, founder and solo developer at Positech Games, for many years. He’s quite opinionated and his last post is no exception:

“ […] In 2020, the internet is an absolute cesspit, bringing out the absolute worst in human behavior. Its almost impossible to enjoy surfing the web without being sucked into social media. Every site wants you to log in with your social media usernames, so you can be tracked, analyzed, categorised and above-all, monetized. Clearly at some point, someone realized that the one thing that keeps people online (and thus seeing ads) was anger. Anger is the ultimate emotion. Get people angry and they will keep posting, retweeting liking, replying, hating. […]”



Interesting read,



Time until next day starts in UTC (Swift)

Although users interact with NewsWave on their iOS and -soon- Mac, some features are provided by a server.

So, how can I let users know when the server triggers certain tasks? If they are triggered at regular intervals you can simply calculate on the device how long until it will be triggered again. This reduces calls to the server, which in turn reduces cost.

In this example, the function calculates how many hours until the next day -in UTC timezone- starts:

var calendarIso8601 = Calendar(identifier: .iso8601) // Gregorian calendar, which “serves as an international standard for civil use.

calendarIso8601.timeZone = TimeZone(identifier: “UTC”)!

let startOfDayTodayUTC = calendarIso8601.startOfDay(for: Date()) //Start day at UTC

let endOfDayTodayUTC = Calendar.current.date(byAdding: .day, value: 1, to: startOfDayTodayUTC)

let secondsToTomo = endOfDayTodayUTC?.timeIntervalSince(Date())

let hoursToTomo = secondsToTomo!/60/60

The app can then show this number to the user. 



NewsWave for Mac – Dark Mode

NewsWave for Mac is moving along quite well. In fact, 1.0 is feature complete, meaning all features I planned to ship in the first Mac release are already in. I’m now focusing on testing and polish. 

Speaking of polish, here’s a couple screenshots of the -mostly- final version of Dark Mode, updated icons and all 🙂  Let me know if you have any feedback. 

Screen Shot 2020 05 06 at 16 39 30

Screen Shot 2020 05 06 at 16 39 36

Screen Shot 2020 05 06 at 16 39 46

While working on the icons I’ve used Pixelmator Pro for the first time, I’ve been blown away by how good and fast it is. In the past I used Acorn and the standard Pixelmator and… Oh my oh my. Pixelmator Pro is AMAZING. 

Back to NewsWave, I’ll keep you posted on progress, can’t wait to share it with all of you. 


Making Sense Podcast #201 Yuval Noah Harari

One of the podcasts I typically follow is “Making Sense” by Sam Harris. I found his latest episode, where he had a discussion with Yuval Noah Harari especially insightful. 

“[…] They discuss the failures of global leadership, the widespread distrust of institutions, the benefits of nationalism and its current unraveling in the U.S., politics as a way of reconciling competing desires, the consequences of misinformation, the enduring respect for science, the future of surveillance, the changing role of religion, and other topics.”

Here’s a link to the episode if you’re interested. 



Create a NSButton in code (swift)

Some time ago I shared a simple way to create custom UIButtons in code. As I’m starting to polish NewsWave for Mac, I wanted the same ability to easily create custom buttons. So, I ported the function to macOS, feel free to leverage:


    func createNewNSButton(title: String, textSizeDelta: CGFloat?, textColor: NSColor?,  backgroundColor: NSColor?, cornerRadius: Bool, cornerColor: NSColor?) -> NSButton{


        let button = NSButton()


        button.translatesAutoresizingMaskIntoConstraints = false

        button.attributedTitle = NSMutableAttributedString(string: ”  \(title)  “, attributes: [NSAttributedString.Key.foregroundColor: (textColor ?? NSColor.white), NSAttributedString.Key.font: NSFont.systemFont(ofSize: (NSFont.systemFontSize + (textSizeDelta ?? 0)))])


        button.isBordered = false

        button.wantsLayer = true

        button.layer?.backgroundColor = backgroundColor?.cgColor ?? .clear


        if cornerRadius == true{

            button.layer!.masksToBounds = true

            button.layer!.cornerRadius = 22

            button.layer!.maskedCorners = [.layerMaxXMaxYCorner, .layerMinXMaxYCorner, .layerMaxXMinYCorner, .layerMinXMinYCorner]

            if cornerColor != nil{

                button.layer!.borderWidth = 2

                button.layer!.borderColor = cornerColor!.cgColor




        return button



And to add an action you just:

button.action = #selector(whateverActionGoesHere)

Here’s an example of the types of buttons you can create:

Screen Shot 2020 04 04 at 16 49 02

Stay safe & until next time,






Twitter -> @MarcMasVi