{{announcement.body}}
{{announcement.title}}

Hiring My Cat as a Software Developer

DZone 's Guide to

Hiring My Cat as a Software Developer

In this article, see how a developer hired his cat to work for him.

· Web Dev Zone ·
Free Resource

Meet Samson. Samson is a cat, more specifically a Faelis Feline. You can see a picture of Samson below. Since it seems to be popular to work from home these days, I figured I'd hire my cat as a software developer. That way, I can lay around in my hammock, enjoying the sun, while my cat does all the heavy lifting. Whenever it's time to pay salary, all I need to do is to open a box a Whiskas, and voila! Salary paid!

Thomas with Samson, his cat

The idea came from the following logical chain of arguments.

  1. I can't tell my cat what to do
  2. I can't tell my software developers what to do
  3. Hence, my cat must be a software developer

Pretty obvious once you think about it, right...?

I am, therefore, looking for more cats to employ, as senior software developers, to create beautiful purrs of software systems that I can sell to my customers so that I can become rich! Muahahahahaha (evil laughter!)

If you are a cat and you are reading this right now, feel free to apply for a job on my team, where Samson will be project lead, and you might be one of the lucky few making the cut, enjoying a life full of lots of purrs and tons of cat food. After all, creating hundreds of thousands of lines of code and beautifully following all lint standards is as simple as clicking a button. Don't believe me? Realize the following was created by clicking a button, hence I no longer see any needs to employ expensive (human) software developers. 

They'll only beg for more salary and demand coffee and free pizza when working overtime. Much more financially viable to simply hire a bunch of cats. Below you can watch one of Samson's teammates working on some Angular and .Net Core-based enterprise applications.

Below you can see one of these software systems that was in fact created by my cat. This particular system is a movie rental database system, based upon MySQL's Sakila database. However, any database structure can be used for both MS SQL and MySQL to create the end result.

You see, Magic will literally allow you to create a complete .Net Core-based backend and a complete Angular based front by literally clicking a button. This is due to that it reads metadata from your database, which it consumes to create backend CRUD operations towards your database, which it again consumes to create Angular components and services. So even though it will produce about 15.000 lines of code for a database with 80-100 tables, it will do so by having my cat click a simple button, so I figured I no longer need software developers as long as I can teach my cat to click that button. If you can additionally teach your cat how to construct a simple group by SQL statement, extracting a key/value pair from your data, you can even have it create beautiful charts, such as the following illustrates. And even if you can't teach your cat SQL, you could probably teach it to simply copy and paste SQL example snippets from StackOverflow or something, right ...?

The idea was actually conceptualized by taking the observer design pattern to its extreme, to the point where I could create a Turing complete programming language, where each "keyword" in the language was literally loosely coupled together, as simple event sinks. I refer to this process as Super Signals. The programming language I call Hyperlambda. But I suspect its common name will become "Mjau-Lambda" after today for obvious reasons. Below is an example of the code generated for the HTTP GET verb or the "read" operation.

Plain Text
 




x


 
1
.arguments
2
   limit:long
3
   offset:long
4
   order:string
5
   direction:string
6
   address.like:string
7
   address.mt:string
8
   address.lt:string
9
   address.mteq:string
10
   address.lteq:string
11
   address.neq:string
12
   address.eq:string
13
   phone.like:string
14
   phone.mt:string
15
   phone.lt:string
16
   phone.mteq:string
17
   phone.lteq:string
18
   phone.neq:string
19
   phone.eq:string
20
auth.ticket.verify:root
21
lambda2hyper:x:@.arguments/*
22
add:x:./*/wait.slots.signal/*/args
23
   get-nodes:x:@.arguments/*
24
wait.slots.signal:magic.db.mysql.read
25
   database:sakila
26
   table:address
27
   args
28
   columns
29
      address_id
30
      address
31
      phone
32
      district
32
      location
33
      last_update
34
slots.return-nodes:x:@wait.slots.signal/*



The above will again translate into a valid SQL select statement and automatically transform the results of that select into an array of JSON objects. Below is an example of how it will look in the Angular frontend parts of the equation. This — internally in its Angular component — is tied together using a Material Table that is automatically data-bound, or "reactively" bound if you wish, towards all HTTP REST endpoints created in your Hyperlambda backend. And everything magically happens by simply clicking a button, which I am pretty confident I can teach Samson how to do if I just use positive feedback loops connected to my Whiskas feeding device :)

TypeScript
 




x


1
/*
2
 * Magic, Copyright(c) Thomas Hansen 2019 - 2020, thomas@servergardens.com, all rights reserved.
3
 * See the enclosed LICENSE file for details.
4
 */
5
 
          
6
import { Component, OnInit, ViewChild } from '@angular/core';
7
import { MatSnackBar } from '@angular/material/snack-bar';
8
import { MatDialog } from '@angular/material';
9
import { MatPaginator } from '@angular/material';
10
import { PageEvent } from '@angular/material/paginator';
11
import { FormControl } from '@angular/forms';
12
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
13
import { JwtHelperService } from '@auth0/angular-jwt';
14
 
          
15
import { HttpService } from 'src/app/services/http-service';
16
import { CountryEditModalComponent } from './modals/country-edit-modal';
17
 
          
18
/*
19
 * "Datagrid" component for displaying instance of country
20
 * entities from your HTTP REST backend.
21
 */
22
@Component({
23
  selector: 'app-country',
24
  templateUrl: './country.component.html',
25
  styleUrls: ['./country.component.scss']
26
})
27
export class CountryComponent implements OnInit {
28
 
          
29
  // Actual data currently displayed in the grid. The mat-table will be databound to this list.
30
  private data: any[];
31
 
          
32
  // Which columns we should display. Reorder to prioritize columns differently.
33
  private displayedColumns: string[] = ['country', 'last_update', 'delete-instance'];
34
 
          
35
  // Current filter being applied to filter items from our backend.
36
  private filter: any = {
37
    limit: 10
38
  };
39
 
          
40
  // Number of items our backend reports are available in total, matching our above filter condition.
41
  private count = 0;
42
  private hasFiltered = false;
43
 
          
44
  // Number of milliseconds after a keystroke before filtering should be re-applied.
45
  private debounce = 400;
46
 
          
47
  // List of items we're currently viewing details for.
48
  private viewDetails: any[] = [];
49
 
          
50
  // Need to view paginator as a child to update page index of it.
51
  @ViewChild(MatPaginator, {static: true}) paginator: MatPaginator;
52
 
          
53
  /*
54
   * This is needed to figure out whether or not user has access to
55
   * delete, create and update methods.
56
   */
57
  private roles: string [] = [];
58
 
          
59
  // Form control declarations to bind up with reactive form elements.
60
  private country_id: FormControl;
61
  private country: FormControl;
62
  private last_update: FormControl;
63
 
          
64
 
          
65
  // Constructor taking a bunch of services/helpers through dependency injection.
66
  constructor(
67
    private httpService: HttpService,
68
    private jwtHelper: JwtHelperService,
69
    private snackBar: MatSnackBar,
70
    public dialog: MatDialog) {
71
 
          
72
      // Checking if user is logged in, at which point we initialize the roles property.
73
      const token = localStorage.getItem('jwt_token');
74
      if (token !== null && token !== undefined) {
75
 
          
76
        // Yup! User is logged in!
77
        this.roles = this.jwtHelper.decodeToken(token).role.split(',');
78
      }
79
    }
80
 
          
81
  // OnInit implementation. Retrieves initial data (unfiltered) and instantiates our FormControls.
82
  ngOnInit() {
83
 
          
84
    // Retrieves data from our backend, unfiltered, and binds our mat-table accordingly.
85
    this.getData();
86
 
          
87
    // Necessary to make sure we can have "live filtering" in our datagrid.
88
    this.country_id = new FormControl('');
89
    this.country_id.valueChanges
90
      .pipe(debounceTime(this.debounce), distinctUntilChanged())
91
      .subscribe(query => {
92
        this.paginator.pageIndex = 0;
93
        this.filter.offset = 0;
94
        this.hasFiltered = true;
95
        this.filter['country_id.eq'] = this.country_id.value;
96
        this.getData();
97
      });
98
    this.country = new FormControl('');
99
    this.country.valueChanges
100
      .pipe(debounceTime(this.debounce), distinctUntilChanged())
101
      .subscribe(query => {
102
        this.paginator.pageIndex = 0;
103
        this.filter.offset = 0;
104
        this.hasFiltered = true;
105
        this.filter['country.eq'] = this.country.value;
106
        this.getData();
107
      });
108
 
          
109
/* ... snippet away since Samson found it boring ... :) /*
110
  
111
  }
112
}



The Sakila system, for instance, contains the same amount of code that a software developer on average would need about 3 months to create according to research in the area. However, Samson created it in 20 seconds. Would it be unfair of me then to invoice my client €20.000? Hmm. Maybe I should avoid getting greedy; better give him a good price. I think I'll send him a smaller invoice for only €18.000. After all, it's not like I did any work myself, right ...? ;)

Feel free to send me an email if you're a cat and you're looking for work, that way I'll feed you a can of Whiskas per day while invoicing my customers about 40 trillion dollars for the work you do in every single day. Mjaauus and Whiskas for you, dollars for me :)

Muhahahahaha (evil laughter 2.0)

Puuh, it's exhausting clicking that button. Below you can see me and one of my colleagues who's name is Happy, taking a catnap after an exhausting 5 seconds of work...

By the way, happy April Fools Day ;)

Topics:
agile adoption ,dotnet ,scrum ,web dev ,web development

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}