design – Example of an interview coding project in your company?

I was wondering what are your experiences as backend developers, when you were applying for a job, have you got any interesting coding assignment/project to do?

For instance, employer gives a link to a web shop or any other business and ask you to make a backend system for it (i.e. to replicate functionalities from the original). Any particular stack to use?

If you did get these or similar assignments/coding projects would you care to share?

It can be for any seniority level.

Privacy, Canaries, Crypto, and Backpacking: Interview with Curtis of IncogNET!

IncognetOur interview series has featured a wide opinions and views.  Today’s interview is no exception – and it’s a real treat to read!  Curtis from IncogNET joins us to discuss privacy, free speech hosting, canary warrants, vpsBoard, and backpacking.  I thoroughly enjoyed reading this interview and I think you will, too!

Be sure to check out their latest offer on LowEndTalk.


Where in the world do you live?
I’m currently enjoying life in the American midwest. It’s not always where I want to be, but anytime I’ve lived elsewhere in the country I somehow always find myself coming back this way.

How did you get involved in the hosting industry?
Oh man. Well, let’s see… When I was younger and a teenager, think early 2000’s, I always had little project websites. This was back in the Angelfire, Tripod, GeoCities day. Basically little sites that had some BMX or skateboarding content. As a teen I would make skateboarding and BMX videos with friends or just film dumb skits and wanted a place to showcase them. This was pre-YouTube days if some of you younger ones can imagine. So I sort of always had project websites and loved webhosting from an early age.

Fast forward to 2010 or so, I was living and working on a organic pomegranate orchard / wildlife bird refuge in Nevada and parted ways with the business and decided to come back home. While helping manage the orchard, I had done some things like develop an online marketplace where we could sell our fruit direct to customers and was very much into managing our online presence at the time.

After leaving that job and finding myself back in the midwest, I started Surmounted.NET – And I’m not even for sure why, exactly. In Nevada I was managing a business, a fruit orchard. I guess I wanted to continue to do something business related, while involving another thing I was interested in: Web Hosting. It actually went pretty well, we didn’t deadpool or anything, but it was probably about 18-20 months after starting it that we got bought by GigaTux. As far as I know there are still customers of the brand however the website remains as I have left it in 2011.

So, even though my first dive into the industry as a provider didn’t last forever, I learned a lot. After that I spent years in other industry roles with various companies, everything from front line support and sales for larger companies to some management level stuff for smaller ones.

Let’s step back in time and talk about vpsBoard. As many of our readers know, it was a VPS discussion site using IPB. What lead you to its creation?
Well, I think at the time I, as well as many community members of this very site, (LowEndBox / LowEndTalk) were unhappy with the management of this community. And although this community ultimately stood the test of time and is managed better than it previously was, there was a time when many were unhappy. Unhappy enough to turn a brand new forum into a pretty active and happening spot online for a while, at least. I can honestly say I never really anticipated it becoming as popular as it did at it’s peak, but when comparing the two forums today – LowEndTalk is definitely came out the victor and is far superior today.

vpsBoard LogoYou put a ton of time, effort, and money into vpsBoard – what happened? Any lessons learned? (Best logo ever, btw)
What happened? Things fizzled out. While we had a ton of community members and daily activity, as well as some unique projects, in the end… “things just fizzled out.” I’m not sure if there was any particular single instance that was a turning point, I’d like to think it was a combination of several small things that added up. Everything from software updates and a new UI to things I hesitated on like better mobile functionality as well as battling user input of, “Too much industry drama” or “Not enough industry drama” depending on who you asked. Anyone who has ran a community knows what I’m talking about, you can’t please everyone and you try to find good common middle ground to accommodate both sides and sometimes you end up with no one happy.

I tried so hard to keep things alive, introduced things like our article bounty program, ran DailyServerDeals which was a unique and fair platform, and more… but in the end things just slowed down to the point where, with combined with “life”, I decided to just shut the site down. I was working 6 days a week at the time at job outside of my home, in an environment where I wasn’t able to have a phone on me to check on things, and it didn’t make sense to leave it without someone babysitting it.

The original plan was just going to consolidate all of our servers (we rented a lot of servers from community members to power different aspects of the site and related projects) and then do a HTML archive of everything as it was at the time. I wanted the content to live on and continue to be available. There was some public discussion about what I wanted to do. I didn’t want to sell it and was pretty publicly against the idea and I still get some grief for it today, but ultimately in the end sold it to KnownHost. I convinced myself that it’d be better to keep it alive and available under the management of a large enough company that could keep it online without much concern for the cost of keeping the lights on. To this day it remains online, and it appears to be more or less unmoderated. But at least the original content that made it great at it’s prime still lives. I still get vpsBoard in my search results all the time.

Mind you, prior to all of this I had been offered a much larger sum of money for the site from an “industry competitor” and declined the sale without hesitation. The folks at KnownHost are good people, and even though the forum today is nowhere near what it once was and isn’t where I’d hope it’d be under new management, in it’s prime it was something pretty great. I learned a lot and met some great people, many of which that I remain in contact with to this day and have fond memories of it.

Now you’re working for IncogNET. Tell us about them.
Towards the end of 2020 I was really itching to do something different and started working on IncogNET. I guess it had something to do with the how politicized the internet has become, how freedom of expression didn’t really exist with big tech, and how online privacy has been relatively disregarded by many. I was annoyed at how much personal information companies required for relatively basic online things. I was concerned by how often even big companies had that information leaked. Hell, just the other week T-Mobile had a huge data breach. Things like that aren’t relatively uncommon, y’know? But more importantly I wanted to do something that encouraged the publishing of regular, normal use content to alternative networks like Tor and I2P.

So yeah, I just wanted to do something different. I asked, “What information is even required to provide a service? What purpose does it really serve the company to have all of this data?” – In the end, I determined that we just don’t want to know all that much about our customers. I mean, we’re not calling them to tell them happy birthday. I’m not mailing Christmas cards to them. Why collect this information to begin with?

Having a background in this industry, both from small companies and big, I can tell you that the vast majority of these companies have horrendous management of your personal details. The ID you submit as a ticket attachment to verify your cheap purchase? Guess what? It’s usually going to stay there indefinitely. It can be seen by most members of that company’s staff or outsourced help. The common software most these companies use to manage their customers don’t really have any privacy specific features that would purge verification attachments. It remains accessible to anyone with helpdesk access for the most part, and that is absolutely insane. If you’re a customer of various hosting providers, do you know how many people within their organization have access to your personal information? Are you really comfortable with that? I guess I just don’t want to collect information that I don’t really need.

But yeah, I decided to do something that was privacy focused. It’s more than just not wanting to collect personal details. I want to normalize privacy for regular people. It boggles my mind that average people think that privacy is only for those who are trying to hide something or that those who seek it are ‘up to no good’. Privacy is definitely something everyone needs to be concerned with regardless if you’re a service provider or an end user.

I’m always on people to find something that differentiates their company from others so their services are not just a copy of a copy of a copy. I’d say IncogNET’s differentiator is your extreme focus on privacy. How do you see your position in the market?
Ha! Yeah we definitely do things a bit different. The thing with other companies is that they’re mostly using the same off-shelf commercial products to sell their service, from similar hardware configurations, network setups or geographic locations. This means there are a ton of providers using the same control panels and technologies, using the same billing / portals and more. And that’s not a bad thing really, many use what work and work well and it’s things customers come to expect and things customers are familiar with. But it leaves little room to differentiate between two separate companies, so it’s not uncommon to see providers compete on price alone or other value added features like software licensing or support.

So, aside from privacy, one aspect of our business is our plans are more sustainable. We’re a small business, bootstrapped from the ground up. It’s easier to manage a smaller number of higher paying clients and provide them with an excellent service versus managing a larger number of clients who pay a lower price. Although we do some deals for this website, we get plenty of sales at our normal, non-discounted pricing as shown on our website. If the revenue at the end of the month remains the same, it makes more business sense to operate in a way that requires less manpower to manage effectively. To put it in perspective, although we’re new with our business being formed in April, only our first month of operation was ‘in the red’ with each month after being green. We’re in a good place where we’re able to leverage some of the great relationships we’ve formed in the industry over the years to get good deals on what we need to take care of our customers.

When I posted your recent offer, I noticed you are heavy into crypto payments. Do you find the exchange rate volatility there difficult to manage, or do you intend for those funds to be “crypto forever”?
It’s still very much too early to really say. I’ve found the crypto payments, so far, have been far more worthwhile than PayPal but we’ve talked about starting to accept additional methods as well such as Stripe and more localized / regional processors that some of our customers outside of the US and Europe may enjoy. The customers who pay with crypto have seemingly been ‘better’ so far as well, meaning less tickets opened by them and no instances of abuse that I can think of. Some of our upstream providers accept crypto so our biggest operational costs are actually paid with it towards the end of the month. The only things we’ve been paying in fiat recently is licensing costs and our bill with Hetzner, which as you know will increase dramatically next year.

Oh yeah, that’s right. You guys use Hetzner in Finland. Hetzner recently announced a huge increase in their IP pricing, an increase so large many providers and customers are leaving Hetzner. What are you plans with that?
I mean, I get why they’re doing it but the rate of increase is absolute insanity. It’s such a financial burden that I see why people are dropping them. Luckily, we don’t have a huge presence in Finland and the cost of the IP addresses that we do lease there won’t be too much of a burden on us and we can absorb the cost and make up for it elsewhere. For now, we’re planning on staying and keeping everyone online on the nodes we already have, but have no plans in the immediate future to deploy any new nodes with Hetzner. For example, some of our own dev boxes and internal stuff that we had there we’re moving to our location in the Netherlands to free up those IP addresses and resources for paying customers, and we’re not accepting orders in Finland for our smallest packages. We’ll only accept orders on the remaining space for packages that are larger, to help recoup the cost of the price increase and have already reserved a large chunk of one node to be used for our own Shared Hosting customers since we have more resources than IP’s there.

Now, we do plan on hopefully shipping some hardware to a different provider in Finland at some point in the future, but have no real plans beyond it just being a thought and something we want to do. No one has been contacted yet, but it’s all on the drawing board. Finland is a great location for privacy and it’ll be nice to grow our presence there. We’ll be working on acquiring our own ASN and some additional IP space soon to accommodate future growth like that, then we’ll start trying to source a datacenter there that can better accommodate us. If we can’t find a home there, we’d like to find something very similar in terms of location uniqueness and privacy laws from a company that is local to whatever location we ultimately settle on.

How do you like using DirectAdmin as your shared hosting platform, compared to the typical alternative cPanel?
My opinions of DirectAdmin is that it’s an excellent panel for the end-user. If you’re a customer of a hosting company and they use DirectAdmin, then the panel works pretty great and it’s going to feel pretty familiar to cPanel. My opinions of DirectAdmin from the perspective of someone who has to use the admin side of things and setup servers with it is that it’s “pretty okay”.

I guess it’s not bad. I spent years working for companies that utilized cPanel so my main experience is with that so perhaps I’ve just gotten used to WHM and what not, but DirectAdmin just seems harder to navigate and clunkier on the admin side of things.

With that said, I have found the documentation to be pretty on point and a great help for when it’s needed. Setup of a new DirectAdmin server seems to take more work than I recall setting up a new cPanel server, but in the end I’m really only concerned about customer experience, and DirectAdmin provides a great end-user customer experience, and cost: DirectAdmin is simply more affordable and offers the same features that your average end-user customer would want. This in turn has allowed us to adopt some commercial value added products like CloudLinuxPro to the mix and things like Softactuous for script installations without having to charge too much for a crazy good service.

I see you offer the option to have shared hosting customer’s sites mirrored to the Tor and I2P network. Do you get a lot of people wanting to host .onion and i2p sites, or is that still somewhat exotic?
It’s pretty rare so far, honestly. I sort of thought it may be a bit more popular but at the same time it’s still very much a beta service that we’re not pushing super hard. It’s not that difficult to offer, but one of these days I’ll be able to mark, “automate TOR / I2P webserver configs with DA” off my to-do list.

The goal behind even offering this is to publish and make available normal, everyday content on these networks. So you have a customer wanting to showcase their artwork, or some dude’s blog about old cars, or whatever. Just normal, everyday internet content. These networks need that type of content in mass to be adopted by your normal everyday internet user. Tor and I2P are great networks and part of normalizing online privacy is publishing ‘normal’ content to these networks that regular people may enjoy. It doesn’t all have to be tech blogs and 4chan style image boards or some of the random sketchy stuff that people often associate with these networks. And for the handful of our users who have opted in, their sites are just as normal as you’d find anywhere else.

You guys have a warrant canary on your site. There’s been some debate about the legality of those – i.e., if posting and then removing it when served with a request is the same as breaking the court-ordered silence. What are your views on this?
You’re not the first to ask this. Well, at this point if I were to remove it if I felt it’s pointless then it will spook those who think it’s meaningful and it’d be used as some indication of something being off. If we’re given a lawful order and it was loose enough that it didn’t specifically state I couldn’t say anything, then I’m going to state what details I can with respect to the customer in question’s privacy.

I’m actually working on a public transparency portal, something that would serve a few purposes. I want a place to showcase any subpoena or communication between us and law enforcement with private information redacted and quarterly stats as well as place to show off things like bandwidth graphs of resources we donate to anonymity networks or anything else relevant like donations we may have made to pro-privacy causes we care about.

The same portal would also include information on abuse report stats, how we handled them, etc. It’ll probably come at a time when we have more information and data to draw from but ultimately it’ll be a place where people will get a feel for how we manage our network and how we respond to lawful requests, of which we’ve received none so far.

Remember, “We can’t share what we do not know”, and because we don’t require much information and allow access to key areas of our site via alternative networks, there isn’t much we could share even if forced to.

This reminds me of the big news about ProtonMail releasing the details of one of their users who was an activist who drew some law enforcement attention. Everyone wants to blame ProtonMail for abiding by the law, but no one seemingly wants to blame the user who failed to use the tools made available to them such as ProtonMail’s Onion service or even doing simple things like just checking your email at a local coffee shop instead of home. A service provider can only share what they know about you, they’re not investigative units and aren’t going to waste time trying to connect dots for law enforcement. That’s not their job.

You’ve offer a “BS Blocking” VPN service which is designed to block ads, trackers, etc. Is this similar in theory to Pi-Hole, only better? In my experience, so many of the major sites are now pushing ads through their main domain that DNS blocking doesn’t always work. For example, to block Facebook ads, you have to block facebook.com. What’s been your experience?
Yeah, it’s very similar actually and our blocklists that we maintain were actually originally designed for Pi-Hole and are available on our GitHub page and can be used with Pi-Hole, AdGuard, Technitium, etc. While it’s true that many sites are pushing ads through their main domain, it still gets a good majority of them while also blocking the tracking elements and known malicious scam, phishing and other sites from resolving. The real benefit I think is on mobile, where apps ping a lot of different servers to transmit telemetry and analytic data. I’m not saying it’s the perfect solution, it’s not, but it’s still a very good tool in the toolbox. On desktop, using our ad-block VPN to catch all that it can at the DNS level combined in-browser plugins will prevent the ads that stem from the main domain of the site in question. Combined with our no-logging policy and no data-caps, it’s a pretty good service as long as you’re okay with our limited six locations in which we offer it from.

Interestingly enough, while working on rolling this service out publicly and watching our own requests be made in real time, it was noted that the Brave Browser was leaking DNS requests for Tor Onion sites. They have a “privacy feature” that allows users to access .onion domains and we kept seeing .onion domains coming through the network and couldn’t figure out why at first. I posted the details of our finding on a community project of mine, and it picked up steam fast. The news was picked up by ZDNet, MSN, CoinDesk, TheRegister and more tech specific sites. This was a huge mishap on Brave’s part as they put a countless number of their users at risk for a very long time by allowing their Onion requests to be logged by their ISPs since it was showing their real IP address associated with their request. Unfortunately this was before IncogNET officially launched, because it would have been great press for the company to release this information but it is what it is. Glad it was fixed and patched by Brave even though they knew about it for a while prior to fixing it.

Tools to enhance privacy have been around for decades. PGP dates from the 90s, but I can count on one hand the number of PGP-encrypted emails I’ve received in the last 10 years. What is your take on the future of privacy?
Ha! Yeah, PGP isn’t used nearly as much as it should be. I attach my public key to all my emails and I can count on one hand how many times it’s initiated an encrypted back-and-forth. One of our upstream providers is the only one I communicate with regularly using PGP, and by regularly I mean they send us our invoice once per month now, but it was nice having a normal pre-sales exchange between potential customer and provider towards the beginning of us choosing them as one of our VPN locations. All of our communication was via PGP-encrypted email.

Heck, we offer PGP encrypted webmail for our shared hosting clients. The Engima PGP Encryption plugin is pretty popular on desktop clients, but it’s also a stock plugin for RoundCube, one of the most commonly used webmail clients that comes pre-packaged on any modern control panel software. So really it was no effort at all to enable, it’s just not enabled by default. So we’re not really doing anything in that regard that no one else can do. All of your favorite web hosting providers could take a few minutes per server to enable this. The downside to this is that it requires the customer’s key to be stored on the server which will be a turn off some. It’s still a good way to get someone who hasn’t used it before to start using PGP and getting a feel for it and how it works.

But you asked what my take is on the future of online privacy. Well, I foresee it being eroded more and more while your average internet user doesn’t really seem to mind. Even if you have ‘nothing to hide’, you should be concerned about where your data exists, who has access to it, and how big of a pain it is to clean up after a company, big or small, has a security breach that reveals your data to the world. Do you want your data, your clicks and online habits be used to manipulate you in a way that makes you spend more time staring at a screen instead of spending your time in a more productive way? How do you feel about the potential of a joke or sarcastic comment you posted online three years ago being the reason that you’re sitting in front of HR tomorrow? These should be the concerns that regular, “not privacy oriented” type of people should consider more, I think.

You’re a backpacker, which has to be the polar opposite of the Mountain-Dew-and-Cheetos sysadmin stereotype. Been any place great? Any place recent?
Man wasn’t made to sit in front of computer screens for 12+ hours a day without feeling the sun on his face or the breeze in his hair, that’s for sure. With that said, I’ve been so incredibly busy this year that I’ve not gotten to enjoy the outdoors as much as I’d like beyond hitting up some local trails for some short jaunts in the woods.

Last year I actually set out to complete the entire 2,100 mile Appalachian Trail. I was going to hike and live in the woods, on trail, for about 120 days that I had set as a goal for myself. I had a lot of training, spent countless nights under the stars, in the woods for days at a time. I felt pretty comfortable and confident as a lightweight / minimalist backpacker that I could actually complete this.

So, I fly to Maine in the middle of a pandemic knowing damn well sections of the trail would be hard to resupply on. Knowing that many hostels in my guide book were closed. I quit my job to do this, y’know? So, long story short I get to Maine, I climb Mount Katahdin, the northern terminus of the trail, and no one is there. No one else was up there. It’s not a super crazy mountain but if you’re into backpacking then you know most of the east coast trails are old and super rugged whereas out west, despite being taller mountains, they’re better maintained and they utilize switchbacks to climb a mountain instead of just going up straight and over, ha! Katahdin is pretty iconic and definitely not an easy mountain to climb, there is a lot of bouldering and areas I ran into where I wondered how I’d get back down.

I’m all alone and I keep getting drizzled on for a little bit at a time, then it’d clear up. I was trying to rush down because I wasn’t for sure what the weather had in store and getting caught on a mountain during a storm isn’t particularly safe. On my way down, I obtained a mild foot injury. At the time it just sort of hurt, but wasn’t too major of an annoyance and I didn’t think much of it and kept on truckin’. I hobbled back into camp after dark and didn’t think too much of it at the time. That was my “day 1” on the trail. Day 2, I get up before the sun, filter some water from a stream, make my breakfast drink and hit the trail. By lunch time my foot just wasn’t having it. It felt like I had sprained some toes somehow, it was odd. I just knew that I couldn’t hike the next section of the trail on just the ball of my foot… The next section being the “100 Mile Wilderness”, the longest unsupported and most desolate section of the entire 2,100 mile trail.

So I used the one bar of cell service I was finally able to obtain to request a pickup and ride into a nearby town to rest for a few days to rest. While there, I ultimately convinced myself my foot wasn’t up for the task and got spooked about the next section. Seemed like the longer I waited the more doubt I begin to have. I considered flying to DC and starting off at Harper’s Ferry, the halfway point, and doing the southern half of the trail since it was easier, but I wasn’t happy with the idea of not doing it all in one long shot. In hindsight this is likely what I should have done, just gone to DC and did the second, much easier half of the trail going southbound.

Anyhow, my friend was doing the Tahoe Rim Trail at the time, and after talking to her I decided to come home and make plans to do that after my foot was better. The Tahoe Rim Trail is a 170 mile loop trail that circles Lake Tahoe in Nevada and California and has some amazing scenery. It’s also closer to towns for resupply and more populated than the Maine wilderness which seemed like a bonus for a guy coming off a foot injury and unsure if I’d need help or not at some point.

About two weeks before I was scheduled to leave, small wildfires were dangerously close to the trail. The week before I was to leave, sections of the trail was closed due to the now large wildfires in the area and air quality conditions. So I canceled my flight. And luckily so, really, as by the time I would be on trail certain large sections of trail remained closed and the air quality was so bad that you often had no views and would just be in a constant fog of smoke and ash. Haven’t rescheduled, but man I wish it would have worked out as it’s a beautiful part of America.

Luckily I’m not alone with IncogNET. I feel like when the time is right, likely next year, I can start disappearing for a few days or a week here and there again and be confident that everything is in good hands while I enjoy the great outdoors. I definitely want to tackle the Appalachian Trail in it’s entirety someday. I thought 2020 was going to be my year, but maybe I’ll wait a few years and give it a go again. Who knows?

Q. Looking at your AUP, as far as content goes, it seems your limitations are pretty small: no spam, no hacking, no child pornography, no offering services as a hitman or fentanyl auctions, etc. When you say “pro free speech,” where are your limits? Is it strictly “everything that’s legal in the US”?
Ha! Honestly our Acceptable Use Policy isn’t much different than other provider’s, it’s just made to be easy to read.

We disallow all the normal stuff that any sane provider disallows, we have zero tolerance against spam and network abuse. We allow adult content like many other providers, but if the legality of the content is questionable then it it’s not allowed. It’s all pretty standard and consistent industry rules up to that point. The only things we do allow that many others don’t is anonymity projects like Tor relays, I2P routers, VPNs, etc. Tor Exits must run a strict exit policy to reduce abuse, of course.

Regarding free speech, we’re big supporters of it. We believe freedom of expression is a fundamental human right, and even those we strongly disagree with still deserve a voice. With that said, we’re an American based business with two live service locations right now in Netherlands and Finland. Those two locations are great for data privacy but not the best locations for true free speech. We’re looking at some Dallas, Texas based datacenters for expanding into the US so those who actually need free speech can have it. The US gets a lot of flack, but when it comes down to it, it still has the best speech laws. You can certainly say and publish things in America that you couldn’t elsewhere.

Regardless of the personal political beliefs or worldview of any particular customer, as much as I may agree with it or as much as I may find it misguided or repulsive, their money spends the same as anyone elses. We’re a service provider, we’re a business. I didn’t start a business so I could pass judgment on others or pick and choose who have the right to speak freely.

Q. I have to imagine that hosting a website that is offensive/controversial would become a DDOS magnet. Even some relatively popular viewpoints can result in attacks if some technologically sophisticated group decides they don’t like them. If someone signed up and hosted a site that was then bombarded, do you view that as resource abuse? I have to imagine your policies are intended more to say “we will host anything legal” than “we will keep your site up at all costs”. How do you resolve that sort of thing?
That’s a good question, and something we’re still figuring out how best to address.

Although we do offer DDoS protection in all locations it’s not what I would personally consider to be optimal for high risk targets or those who are constantly getting slammed. It’s good general use protection, but that’s not what we specialize in, so utilizing a 3rd party protection service may be needed for some. I’ve briefly looked into 3rd party protection services that we may be able to resell or offer as an addon for those who may need it, but it’s not anything we’ve moved forward on just yet.

To put it simply: With the current size of our company and our price point we’re simply not capable of moving hell and earth to put a ton of additional resources behind keeping a site online that has gained some sort of widespread negative attention. As with any provider, you can only do what is within your ability and outside of that you can consult and make some recommendations. I think that as we grow we’ll be able to better position ourselves to respond to situations like that.

Anything else you’d like to add? Whats the plans for the future of IncogNET?
Yeah, buy web hosting from us! Ha. But seriously, we’ve got some good things planned for our future.

Right now we’re planning on spreading our Shared Hosting offering to Finland where we already offer Virtual Servers from, as well as in Dallas, Texas with a provider that we’re wanting to test out as a future home for some colo gear where we can also offer Virtual Servers from.

We also are working on some updates to our anycast DNS over Tor setup that the VPN network uses. This is to increase the capacity and capability of the setup as well as offering domain names with built-in DNS management through WHMCS. Private registration with DNS management under one roof. ETA, end of year or early next year.

raindog308

I’m Andrew, techno polymath and long-time LowEndTalk community Moderator. My technical interests include all things Unix, perl, python, shell scripting, and relational database systems. I enjoy writing technical articles here on LowEndBox to help people get more out of their VPSes.

interview questions – Is it considered bad code/style to use built-in libraries to solve a programming problems?

Back at Uni I recall several teachers forcing students not to use built-in libraries, and instead have us build things from scratch like data structures/algorithms.

My question is in the real-world and in programming interviews is it considered bad to use built-in libraries?

For example (using itertools combination to find all combinations of r=2 in a list):

from itertools import combinations
  
def rSubset(arr, r):
  
    # return list of all subsets of length r
    return list(combinations(arr, r))
  
# Driver Function
if __name__ == "__main__":
    arr = (1, 2, 3, 4)
    r = 2
    print (rSubset(arr, r))

Thanks in advance

Interview question C++

Write a function:

vector<int> solution(vector<int> &A, vector<int> &B);

that, given a zero-indexed, linearized tensor A consisting of N integers and a zero-indexed array B consisting of K integers representing the size of each dimension of the tensor, returns an array of integers where each element of the output tensor is the mean of the corresponding element in the input, A, and its neighbors in each dimension. The result should be rounded appropriately. Non-existent neighbors (eg. a neighbor that would be outside the tensor dimensions) should be treated as 0 valued).

For example, if A is (1, 2, 3, 4, 5, 6) and B is (1, 2, 3) then A represents the linearization of a tensor with an inner-most dimension size of 3 and an outer dimension size of 1.

interview question of hypothesis test: how many tests are needed to say a biased coin

Here is an interview question of hypothesis test:

When you observe 10% more heads than tail, how many times do you have to test to get the statistical significance to say coin is biased?

I don’t much understand what I should test?

Does that mean we should test $H_0: p = 50%,$ using number of head $Xsim N(np,np(1-p))?$ And calculate $n$ to make
$$dfrac{55%n-np}{sqrt{np(1-p)}}$$
match significant level? Here $55% – 45% = 10%.$

Reducing Support Calls: Interview with Surya Prakash, Founder of DemoTiger

DemoTigerOur interview series has featured a lot of industry leaders and we continue today by talking with Surya Prakash, Founder of DemoTiger, which produces video tutorials for hosting companies. Long-time vets of the industry may remember DemoWolf, which closed in 2019. DemoTiger has picked up where they left off, providing provider-branded tutorials you can offer your customers. Read on to learn about this business, its market, and how it’s grown.


Where in the world are you headquartered?
Delhi. F-3/22, Sector-16, Rohini, Delhi, India

Are you related to Dewlance or part of that enterprise?
We wanted to create a product that meets the requirements of web hosting users and remains within the reach of every size web hosting company. Technically our product should be flexible enough to adjust itself with different video hosting platforms, electronic devices, and integrate with as the number of billing software as possible. To achieve all these features we needed people, who have been in the web hosting industry for at least a decade. We needed them for new ideas, valuable suggestions, and cross-check of the finished product. We made a small group of advisors comprising web-hosting providers, support employees of web hosting companies, designers, and programmers. Dewlance has been one of those proactive members who help us a lot and yes now they are a stakeholder in DemoTiger.

DemoWolf closed in 2019. Did you just see a hole in the marketplace and decided to jump in or was there another reason you decided to start this offering?
I have created explainer videos, advertisements, and support videos for big web hosting companies for a long time. They pay a hefty amount and hire the best people in the industry. It gives them an undue advantage over small and medium companies. These big giants not only have an almost unlimited budget for everything to promote their product and acquire a lion’s share of the hosting market but also access to all the latest add-ons as a Web hosting provider. They have almost forced small/medium-sized companies to confine themselves to few good hosting-related forums if they want clients. Whether it is social media, video platforms, or any other popular place every hosting provider needs good quality videos to attract viewers. Videos are the most preferred content by most viewers.

I remember my colleagues used to reject offers to create tutorial videos for small/medium size companies as their order size was small or not as large as of a big company. When a small/medium hosting company was denied access to such resources even if they are ready to pay I felt guilty. My videos reduce support tickets and are designed in a way that advertises the brand logo of my clients. I have used music and style that leave a long-lasting impression on the mind of the viewers. I have purposely created a product that can be hosted on free video platforms like YouTube and can be integrated with support websites. Videos open on the support website without redirecting the viewers to YouTube or any other video hosting platform. It clearly shows my intention to keep the expenses of my clients as low as possible and advertise their brand like a big hosting company’s brand is advertised. Just compare the features and the cost of videos of DemoTiger and earlier video providers. I leave this on you and your readers to decide whether I have jumped in the marketplace leaving a high-paid job or I want to help small/medium web hosting providers in their struggle to maintain their existing clients and fetch new clients from the world’s second-largest search engine YouTube.

So if DemoWolf struggled and couldn’t make a go of it, what are you doing differently that makes this a profitable enterprise for you?
I do not know about their struggle but it’s a very good question that we ask ourselves daily that what the different things we can do that improves our product and keep it relevant. The web hosting industry is very dynamic and demanding. You have to be flexible and ready to embrace the new changes. Our videos are available in different formats and are multipurpose. They can reduce support tickets as well as advertise the brand logo of a client on different platforms. Also, we designed them, keeping in mind, the predictable changes in formats of Videos in coming times. Today it is MP4 but tomorrow it can be ‘4K’ or something else. Not only this, few clients returned after 3 months asking again for a new set of videos as their server provider had lost all their data due to some technical issue. We had their logos in our database with the same settings that we had used while producing videos for them 3 months back. Our staff also, sometimes, upload videos on YouTube channels of our clients. We try to provide the most reliable product with the best services to give our clients a world-class experience.

By giving multiple video hosting options both free and chargeable we have tried to make our product affordable for almost every type of Web Hosting Company. Whether you have a small size company with limited revenue or you are a medium-size company that can afford video hosting and streaming expenses, our product is affordable and useful for everyone.

What topics are you prioritizing in your videos?
First, we try to include those topics that are mostly searched by web hosting clients on Knowledgebase websites, YouTube, and that generate maximum tickets. Second, we raise our level to include those technical answers that are asked intermittently but consume lots of time in replying. In this way, we reduce tickets in number as well as save more time for hosting providers and their support staff while keeping the number of tutorials as low as possible. Another benefit of this strategy is that our videos try to keep the hosting clients away from a human intervention that ultimately brings harassment to clients.

Surya Prakash of DemoTigerWhat kind of response have you got in the marketplace?
The customer support has been very much enthusiastic so far. We have received very good comments from our customers at the beginning of our journey as tutorial makers on various Web hosting forums, emails, and messages that boosted our confidence and motivated us to keep increasing the quality and quantity of our videos. But till now we have not been supported much by web hosting-related forums and promoters. The content of forums is mostly contributed by small and medium-sized web hosting providers and my product is made for helping these small providers by saving their time and money on the support system and brand advertisement. Although we expect that with time passing on we will be recognized by web hosting forums and other stakeholders.

I imagine the video production is very labor- and time-intensive. What is that process like?
Yes, while making a video you need to be focused. You have to take care of multiple things at the same time. Even a minor defect in videos is clearly visible so sometimes you need to edit or delete all the work you have done so far because of a common error in several videos of a series. It takes an excruciating amount of time and effort to design and produce error-free video series. After that starts the testing work on different digital platforms with different integration files. While designing you have to keep the possible changes in the future in your mind and make the product that can adopt those changes. Sometimes it is frustrating when you are forced to delete all your work because you found an error or change at a later stage of production.

I would think that your service would appeal to all kinds of hosting providers, because hopefully your videos reduce support calls which is something everyone wants. What kind of providers have been most responsive to your videos?
We haven’t started advertisement of our product as we are still busy creating videos on different web hosting-related software tools. Therefore very limited people in the industry are aware of our products. Although we have received orders, requests from almost all sizes of web hosting companies because of the multipurpose use of the videos. Some servers providing data centers have also shown interest in our product. Whether it is for support or advertisement on YouTube, Facebook or email marketing our product is useful. It convinces me and my team that we will attract almost 100% web hosting providers and few other hosting-related businesses also.

Are you considering videos in other languages?
Yes definitely first our focus is on English language users and then we will consider other languages also. We have a list of software tools that we will complete first in the English language and then we will start our work in different languages. We have started receiving requests from hosting companies of different languages but still, it will be too early to tell exactly which language we will include but looking at the level of interest I am sure our videos will be in multiple languages.

Tell us about your reseller program.
We offer 3 reseller levels to choose from Bronze, Silver, and Gold. We have kept the initial deposit amount low to attract more resellers. With a deposit of a small amount in your reseller account, you can start selling our videos to your customers. The resellers will be provided with demo videos and all types of content that they can have on their website and start taking orders. One just has to sign up with a few personal and company details on our reseller page and deposit the requisite amount as per the reseller level he chooses and then starts selling. The deposited amount remains in the reseller account that is used by him for purchasing our videos for their clients. Bronze level is the beginner’s level that requires the least deposit amount and Gold is the highest reseller level. One can upgrade and downgrade as per will at any time after purchasing our plan.

Where do you see DemoTiger going in the future?
Well, we plan to create more and more useful videos on different software tools and include as many features in our product as makes it a valuable asset for our clients. Videos are mostly preferred content and various search engines including Google, YouTube, etc. give relevance to the content on a website while indexing or ranking a particular website/webpage. With the rise of free video hosting platforms such as YouTube as the second largest search engine and lowering the cost of video hosting and streaming options available in the market the demand for videos has increased. We hope that the future of the video tutorial-making business is bright and our Company, DemoTiger will also grow with time.

Anything else you’d like to tell us about DemoTiger?
Our next release is video series on the DirectAdmin control panel and much more is in the pipeline. Soon it will be available for everyone on our website. I would close this interview by asking all my small/medium web hosting providers and people related to them for their support that we need to keep making videos for them. These videos will be proven a multipurpose tool in hands of web hosting providers. Thank you so much for your patience.

DemoTiger

raindog308

I’m Andrew, techno polymath and long-time LowEndTalk community Moderator. My technical interests include all things Unix, perl, python, shell scripting, and relational database systems. I enjoy writing technical articles here on LowEndBox to help people get more out of their VPSes.

Excellence at Every Layer of the Stack: Interview with John Barker, Founder of SolaDrive

SolaDrive Logo
Our interview series has featured a lot of industry leaders and we continue today by talking with John Barker, Founder and President of Operations of SolaDrive, an enterprise managed solutions provider (MSP).  They offer a wide variety of PaaS/SaaS solutions – everything from infrastructure basics like backups to heart-of-the-enterprise solutions like Odoo ERP…and they offer managed VPSes as well!  (See below for a code). 

As you read on you’ll recognize a few famous names from yesteryear: Volume Drive and burst.net, and learn how SolaDrive recovered from issues they experience with them.

Enjoy this look inside a leading MSP provider as John talks about his background, how SolaDrive has grown, and how he sees the industry developing in the future.

Tell me about your background and SolaDrive’s history?

First of all, I would like to thank LowEndBox for this interview opportunity. I have been in the hosting industry in various forms since 2005, about 16 years now. I started in my teen years developing gaming websites for Rise of Nations and Counter Strike Source while also managing multiple servers for these games. This piqued my interest in server management which led to my later involvement in web hosting.

This eventually transitioned into creating SolaDrive in 2009 that I have been working at ever since. SolaDrive is a managed service provider (MSP) offering SaaS and PaaS solutions. We offer a wide variety of services from managed VPS and dedicated servers, R1Soft and Acronis backup server hosting, high-end load balancing and HA (high availability) cloud hosting, to managed Odoo ERP hosting solutions. Since our start we have grown to multiple locations in multiple countries. We have no plans of leaving the hosting sector or making any changes to the core services we provide, only adapting to the ever-changing hosting industry and technology driven world.

John BarkerThe market is evolving rapidly, what are you and SolaDrive doing to stay relevant?

That is a great question, and one we ask ourselves regularly to ensure we’re evaluating the products and services we offer to meet the current and future demand of hosting. While VPS and Dedicated Servers have been around for many decades, and in our opinion many more, we have branched out to offering other products. Since our beginning in 2009 we have added products such as managed backup services, Disaster Recovery as a Service (DRaaS) solutions, ERP hosting, Advanced Server Setups and Architecture Consultancy, Colocation Services, and specialization in WordPress & Magento hosting. We plan to add even more services in the future as technology and hosting evolves.

Staying relevant and offering products or services that are in demand can sometimes be tough since technology is constantly changing and improving. In the last two years we have taken up a niche market of ERP (Enterprise Resource Planning) and CRM (Customer Resource Management) software hosting. While we mainly focus on managed Odoo hosting, advanced server setups, and hosting consultancy for Odoo, we also provide support and development for Odoo which we have found to be a successful new path for us. One of the silver linings from the COVID pandemic was a surge in demand for ERP hosting as small businesses were forced to close. Those who were able to adapt looked to move their stores and shops to online ecommerce platforms like Odoo, Magento, ERPnext and many others.

SolaDrive Banner

What would you tell someone looking to start a hosting company today? What advice would you offer?

Let me start by telling a few stories where this actually happened. When I first started providing hosting as a hobby many years ago and saw early success, people would sometimes ask if I could help them start up their own hosting venture. I ended up helping two people get started. From the initial website, billing software, support desk, acquiring a support team, to even their first clients. When I eventually transitioned to giving them the reins, they quickly backed off and found it “wasn’t for them” or “took too much of their time.”

Maybe I over simplified what it took to run your own hosting operation or made it sound easier than it really is.

So, if someone were to come to me today looking to start a hosting company, I would tell them how much time, money and dedication it takes to get one started. It’s not easy, and some nights you will wonder why you chose this path. The market is oversaturated making it even more difficult to compete against competitors offering the same services. You need to have a niche product or offer extremely great, next-level service to succeed and survive. But if you enjoy this kind of work and you stick through the struggles to find success, you will find it extremely rewarding.

What is Odoo and what made you decide to start offering it as a service?

Odoo is a business management software suite that covers your customer relationship management (CRM) and enterprise resource planning (ERP) needs for small to medium sized businesses. Odoo is an open-source solution featuring more than thirty default modules, from inventory and warehouse management to accounting and billing. All modules interact with one another to transfer business information, keep everyone on the same page and maximize efficiency.

With Odoo it lets you review your inventory, monitor sales efforts, manage shipments and manufacturing efforts, review employee activity and productivity, and much more. The system also automates your accounting work. Odoo supports thousands of third-party modules and plug-ins and can also integrate with QuickBooks, Shopify, OpenCart, Prestashop, Magento and many other third-party systems. With Odoo you can manage all aspects of your business from one web-based software control panel. So, providing hosting services and support for this software that thousands of companies use everyday made sense to us.

Where do you think the future takes the hosting industry?

If I were a betting man, I would guess that Cloud Hosting will be the future due to its high-availability architecture and scalability. At the same time, I also believe that there will always be a place for VPS and bare-metal servers. While many companies have or are planning to transition to the “Cloud”, we have also seen many make the move to virtual servers and dedicated services due to cost, lack of flexibility and performance issues. So, I wouldn’t write off the original hosting technologies and methods quite yet.

Tell me about a couple things in your professional history you wish you had a “do-over” on? What did you learn from them?

I have made my fair share of business mistakes, more than I would probably like to admit. But they also helped me learn what not to do and how to avoid them in the future, along with ways to find success in this dog-eat-dog hosting industry. Whether it be a failed marketing strategy, handling of technical issues, or working with customers that were done less than stellar. It’s these mistakes that taught me how to improve the service we provide at SolaDrive.

If I had to recall the worst mistakes I’ve made, it would be in the beginning days of SolaDrive when I had chosen sub-par infrastructure providers for our hardware and server’s when finding good locations to offer our services. I first started with Volume Drive, which was a budget friendly provider that helped me get SolaDrive started when I didn’t have aggressive startup funds. Unfortunately, we were only with them a few years before they went belly up literally overnight. They actually had rented two U-Haul trucks and moved our equipment along with many other people’s to a random office building miles away from the original datacenter. It turned out they had stopped paying their bills with their facility provider (Burst.net). Fortunately, they had left behind about half of our servers and various other companies’ hardware that rented their own space/racks. In the frantic state of many clients being down, I made the quick decision of getting things back online with the actual data center provider Burst.net. At the time this seemed like a great decision by cutting out the middle-man, Volume Drive and hosting all of our servers with Burst.net themselves who were at the time a Fortune 500 fastest growing company.

Over that week I physically had to recover our remaining servers from Volume Drive and get them moved back to the original datacenter, Burst.net. After 6-7 days of headaches and a lot of late nights, we finally had everyone back online!

It didn’t take long though to realize Burst.net was also a sinking ship. Only a year later they had announced they were going out of business and started dropping their clients except for leased space clients. None-the-less, we saw the flash of horrors we had from Volume Drive repeat in our heads and were able to get out while they were still afloat. While migrating from datacenter to datacenter is never easy and usually involves significant downtime, we were able to plan all the details of this migration and execute with efficient success, unlike before. We ended up deciding to move all of our equipment to ColoCrossing where we have been ever since and very happy with the level of service all around. Since these incidents we have expanded exponentially to multiple datacenters and now offer services in 5 different locations worldwide.

We lost a lot of our customers due to these two incidents and regret ever choosing providers mainly based on budget. While I am very happy with the success SolaDrive has had, I sometimes reflect on these mistakes and wonder where we would be today if we had not suffered such a rocky start.

Tell me about your top two successes in business?

It’s not easy to gauge success when self-reflecting on what is considered achievements, when for the most part it can be subjective to each person’s view of success.

That being said, in my opinion one of the first things that comes to mind as a success has been hiring the right people, retaining them and having them be part of the growth of SolaDrive. In this line of work, the turnover rate of employees can sometimes be quite short. So being able to keep valued staff members who have helped SolaDrive mature to where it is today is an understatement to our growth. Without these skilled, reliable and ethically driven, creative thinkers I am not sure we would be at the same place.

I would contribute another success in business as my passion for technology and business. What was once a hobby for me, turned into a business that I thoroughly enjoy doing each and every day. I think if you can take something you love to do, and make a living out of it, then you’re setting yourself up for success. And in the world of technology and hosting where things are constantly changing, you have to put the time in and love what you do to stay successful or you’ll get burnt out quickly.

What do you enjoy most about your role? What do you find most difficult?

I would say the most enjoyable part of my job is working with customers on new business ventures that focus on the technical side. From the first discussion of a new setup to the final stages of implementation, I find those are the most interesting as you work with the customer to deliver a solution that meets or exceeds their expectations.

The most difficult part is similar to above, but when these solutions, usually the complex multi-server setups, don’t work as expected. While it’s not frequent, it can then take an excruciating amount of time and effort to find the cause of the issue and fix it. Usually, the result of a custom software or application.

Another difficult part of my role is to find new ways to bring customers in and then retain them with quality service and support. This can be a multi-faceted task as it includes marketing strategies, pre-sales and post-sales discussions, and then the technical side of getting services setup and delegated to the proper staff.

Both personally and professionally, what guiding principles ground you?

Be humble, have good morals/ethics, and stay determined.

Give us some details on new and exciting things you are working on?

One of this year’s goals and projects I am working on are switching away from the aging VPS software SolusVM and moving our VPS customers to a new KVM based platform, either Virtualizor or Solus.io. This isn’t an easy task however as most of our customers currently are on our XEN nodes. Eventually we will need to convert these customers to KVM and then transition them to this new management software. From our initial tests on just a few VPS, it looks like it will wind up taking us a lot of time and effort to complete.

Another project we hope to get to this year is automating the setup of our dedicated servers. Most of the time we have to customize each server setup based on each customer’s hardware choices so this wouldn’t normally be possible. What we plan to do is offer a few popular standard server configuration choices that wouldn’t be customizable, but would be automatically set up in under 10 minutes. It wouldn’t stop there though, customers with existing dedicated servers would have the ability to automate the reinstallation of their server with a click of a button. This is definitely a feature I think will be the most beneficial to us since our staff will no longer need to spend time manually installing or reinstalling servers.

Why should customers trust you and your business?

I believe customers can trust us because we have a proven track record of over 10 years providing quality services with truly helpful and honest customer service. I think that by treating each customer with exceptional, personable support that they will be satisfied with our service and find no reason to elsewhere. We have found this usually results in these satisfied customers telling their friends, colleagues and family which turn into new customers. It may sound cliché, but I honestly think the key to customers trusting you and being satisfied is to just provide them with the level of support and service you’d expect to receive.

Final thoughts and anything you would like to add?

I really appreciate having the opportunity to participate in this interview. It was really valuable to take the time to reflect on SolaDrive, from where we started to our biggest successes and lowest lows. I feel privileged to share my thoughts and experiences over the years with the LowEndBox community. It’s not every day that I take the time to look back and reflect on SolaDrive and the history we’ve gone through.

raindog308

I’m Andrew, techno polymath and long-time LowEndTalk community Moderator. My technical interests include all things Unix, perl, python, shell scripting, and relational database systems. I enjoy writing technical articles here on LowEndBox to help people get more out of their VPSes.

python – Interview: Drug Analyzer class

the introduction is this:

You are a member of a biotechnology programming team that is responsible for creating a system for lab technicians, which will assist them with drug analysis.

Your goal is to create the application that will let them input their findings into the system, provide a meaningful analysis and verify the correctness of the data that they have sent.

tasks:

Your goal in this part is to implement the app.drug_analyzer.DrugAnalyzer class. It will be responsible for analyzing data like the data presented below:

+-----------+-------------+------------------+-------------+
|   pill_id | pill_weight | active_substance | impurities  |
+-----------+-------------|------------------|-------------|
|    L01-10 | 1007.67     | 102.88           | 1.00100     |
|    L01-06 |  996.42     | 99.68            | 2.00087     |
|    G02-03 | 1111.95     | 125.04           | 3.00004     |
|    G03-06 |  989.01     | 119.00           | 4.00062     |
+-----------+-------------+-------------+-------------+-----

The initialization of the class can be done from Python’s list of lists (or nothing) and stored in the instance
variable called data as per example below:

>>> my_drug_data = (
...                 ('L01-10', 1007.67, 102.88, 1.00100),
...                 ('L01-06', 996.42, 99.68, 2.00087),
...                 ('G02-03', 1111.95, 125.04, 3.00100),
...                 ('G03-06', 989.01, 119.00, 4.00004)
... )
>>> my_analyzer = DrugAnalyzer(my_drug_data)
>>> my_analyzer.data
(('L01-10', 1007.67, 102.88, 0.001), ('L01-06', 996.42, 99.68, 0.00087), ('G02-03', 1111.95, 125.04, 0.00100), ('G03-06', 989.01, 119.00, 0.00004))
>>> DrugAnalyzer().data
()

The class should also have an option to add single lists into the object. Adding a list to the DrugAnalyzer object
should return a new instance of this object with an additional element. Adding improper type or a list with improper
length should raise a ValueError. An example of a correct and wrong addition output is shown below:

>>> my_new_analyzer = my_analyzer + ('G03-01', 789.01, 129.00, 0.00008)
>>> my_new_analyzer.data
(('L01-10', 1007.67, 102.88, 0.001), ('L01-06', 996.42, 99.68, 0.00087), ('G02-03', 1111.95, 125.04, 0.00100), ('G03-06', 989.01, 119.00, 0.00004), ('G03-01', 789.01, 129.00, 0.00008))
>>> my_new_analyzer = my_analyzer + ('G03-01', 129.00, 0.00008)
Traceback (the most recent call is displayed as the last one):
  File "<stdin>", line 1, in <module>
ValueError: Improper length of the added list.

Part 2
Implement the verify_series method inside the app.drug_analyzer.DrugAnalyzer class.

The goal of this method is to receive a list of parameters and use them to verify if the pills described inside the instance
variable data matches the given criteria. It should return a Boolean value as a result.

The function would be called as follows:

verify_series(series_id = 'L01', act_subst_wgt = 100, act_subst_rate = 0.05, allowed_imp = 0.001)

Where:

  • the series_id is a 3 characters long string that is present at the beginning of every pill_id, before the – sign, for example, L01 is the series_id in pill_id = L01-12.
  • the act_subst_wgt is the expected weight (mg) of the active substance content in the given series in one pill.
  • the act_subst_rate is the allowed rate of difference in the active substance weight from the expected one. For example,
    for 100 mg, the accepted values would be between 95 and 105.
  • the allowed_imp is the allowed rate of impure substances in the pill_weight. For example, for 1000 mg pill_weight
    and 0.001 rate, the allowed amount of impurities is 1 mg.

The function should take all pills that are part of the L01 series, sum their weight and calculate if the
amount of active_substance, as well as impurities, match the given rates. It should return True if both conditions
are met and False if any of them is not met.

The False result should mean that all the passed parameters are proper, but either the active_substance amount or the impurities amount is improper.
In case of a series_id that is not present in the data at all or in case of any improper parameter, the function should throw a ValueError.
Please think what could be the possible edge case in such a scenario.

Example:

>>> my_drug_data = (
...                 ('L01-10', 1000.02, 102.88, 1.00100),
...                 ('L01-06', 999.90, 96.00, 2.00087),
...                 ('G02-03', 1000, 96.50, 3.00100),
...                 ('G03-06', 989.01, 119.00, 4.00004)
... )
>>> my_analyzer = DrugAnalyzer(my_drug_data)
>>> my_analyzer.verify_series(series_id = 'L01', act_subst_wgt = 100, act_subst_rate = 0.05, allowed_imp = 0.001)
False
>>> // The overall active_substances weight would be 198.88, which is within the given rate of 0.05 for 200 mg (2 * act_subst_wgt).
>>> // However, the sum of impurities would be 3.00187, which is more than 0.001*1999.92 (allowed_imp_rate * (1000.02 + 999.90).
>>> my_analyzer.verify_series(series_id = 'L01', act_subst_wgt = 100, act_subst_rate = 0.05, allowed_imp = 0.0001)
True
>>> my_analyzer.verify_series(series_id = 'B03', act_subst_wgt = 100, act_subst_rate = 0.05, allowed_imp = 0.001)
Traceback (the most recent call is displayed as the last one):
  File "<stdin>", line 1, in <module>
ValueError: B03 series is not present within the dataset.

my code passed trough all of tests

after my first failure i tried to let the code most compact and light as possible, using list comprehension and eliminating unnecessary variables, even tought, it added just 5% more to my score, someone can tell me what is wrong with my code and how can i write better codes?

my last code(score:58%):

  class DrugAnalyzer:
    def __init__(self, data):
        self.data = data

    def __add__(self, data):
        if len(data) == 4:
            if all(isinstance(i, float) for i in data(1:)) and isinstance(data(0), str):
                self.data = self.data + (data)
                return self
            else:
                raise ValueError('Improper type on list added')
        else:
            raise ValueError('improper length on list added')

    def verify_series(
        self,
        series_id: str,
        act_subst_wgt: float,
        act_subst_rate: float,
        allowed_imp: float,
    ) -> bool:
        pills = (pill for pill in self.data if series_id in pill(0))
        if pills:
            return act_subst_wgt*len(pills)-(act_subst_wgt * len(pills) * act_subst_rate) < sum((i(2) for i in pills)) < act_subst_wgt*len(pills)+(act_subst_wgt * len(pills) * act_subst_rate) and sum((i(3) for i in pills)) < allowed_imp*sum((i(1) for i in pills))
        else:
            raise ValueError(f'There is no {series_id} series in database')

my old code(score:55%):

class DrugAnalyzer():
    def __init__(self,data):
        self.data = data

    def __add__(self,data1):
        if len(data1) < 4:
            raise ValueError('improper lenght of list added')
        if type(data1(0)) == str:
            if type(data1(1)) and type(data1(2)) and type(data1(3)) == float:
                self.data = self.data + (data1)
                return self
            else:
                raise ValueError('Improper type on list added')
        else: raise ValueError('Improper type on list added')


    def verify_series(
        self,
        series_id: str,
        act_subst_wgt: float,
        act_subst_rate: float,
        allowed_imp: float,
    ) -> bool:
        serie = ()
        for pill in self.data:
            if series_id in pill(0):
                serie.append(pill)
                active = ()
                imp = ()
                weight = ()
                print(serie)
                for pill in serie:
                    weight.append(pill(1))
                    active.append(pill(2))
                    imp.append(pill(3))

        if serie == 0:
            raise ValueError('the serie isnt in list')

        dif = (act_subst_wgt*len(serie))*act_subst_rate
        if  act_subst_wgt*len(serie)-dif < sum(active) < act_subst_wgt*len(serie)+dif and sum(imp) < allowed_imp*sum(weight):
            return True

        else:
            return False

Thanks

algorithms – issue with a task scheduling problem asked during a recent software engineering interview

I recently went through a interview session for a SWE/CS role at a well known company.
It wasn’t specifically a “coding-round” but was titled a “domain interview” session, so I assumed the interviewer was interested in an discussion/high-level-solution related to the problem.

The problem:

You’re given a computation graph with nodes representing computations, edges representing dependence, and the values on edges representing the data-size in MB (input or output) at that edge.
You want to schedule this graph on a single-processor with limited memory X MB.
To execute a node/computation, both inputs and outputs data should fit within X memory of the processor.
It’s given for for each node sum of its inputs/outputs data <= X.
If at any time the data the total data that needs to be stored execeeds X, then there is extra cost per MB of fetching data from the disk. (it can happen with node n1 has produced an output that needs to be used by n2 but not all predecessors of n2 have run yet).
How would you schedule this graph?

My approach/What I discussed:

  • I answered by saying that “in general” this problem is intractable(NP-complete) for multi-processor systems, and likely too for single-processor system due to the memory constraint.
  • Then I suggested a greedy approach based on keeping track of all ‘ready’ nodes at a given time that can be executed as their predecessors have been executed.
  • Which specific node to schedule next from several available/ready
    ones can be done based on trying to minimize the cost associated with
    memory constraint (i.e. seeking to schedule the one with the min cost
    associated with data transfer).
  • If there are several nodes with same minimum cost associated with
    data transfer, the pick the node among them with the biggest
    input+output mem requirement.

During the session, the interviewer didn’t suggest many things or gave any tips or direction on which directions he may have wanted me to lead to, so it turned out to be very open-ended.

He was almost neutral or very slight camera/tight-lipped smile taking notes most of the time.

I couldn’t gauge exactly what interviewer may have been looking for due to the intractableness of the problem — it’s hard to come up with a general optimal algo for such at the top of your head.

Later I came to know I received a ‘no’ decision for this session.

Issue:

This has me puzzled. I’ve been racking my brain on if I didn’t approach it correctly, or if the interviewer was expecting one to talk about something else that the things I mentioned.

Is there something optimal or direct I missed?

Could there be some specific algo that interviewer may have been looking for that generally one is expected to know?

During the session, I thought I was providing a reasonable solution given the constraints of the problem, and could have deep-dived into any direction that interviewer may have asked me to.

But didn’t get any push-back or suggestions from the interviewer during the session, i’m interested to know what i missed or how I should have approached this problem.