Programming

Y’all probably will just lol or say “ok, boomer” or “wat?” or something, but anyone have any experience and/or thoughts on Drupal?

I’d rather work at Arby’s

2 Likes

Eh, this is probably worse, but it’s a new site and I think I’m going to do it in Wordpress. I already have two sites in Wordpress going and this will be a different type of site and lame as it is I think there’s enough demand for Wordpress stuff that it could be a valuable skill as an independent contractor.

Wordpress >>>> drupal for most things

That’s pretty nice. It took me a minute to realize what you were saying about the LookupName enum, but that’s handy.

You can use markdown for your code blocks to make sure it displays the way you want. It looks like you’re just relying on the software to interpret tabs, but it is annoyingly fiddly about white space.

1 Like

Right. We use typescript and RxJS, so I got the gist. I was about to suggest you needed to check that lookupName existed and then it clicked that it was an enum and that you had specified the type of your object such that it was assumed those properties always exist. Because I’m slow :slight_smile:

You know what, you’re right. I was just confusing myself. It wouldn’t throw a compiler error. I was just looking at the code and thinking “what happens if lookupName doesn’t exist?” But then realizing it was an enum made me understand that it’s just part of the API contract, rather than being something more run-time dependent (like the name of a person in a person lookup, or whatever).

We don’t use strict null checks at the moment.

Hi all,

Taking a big long break from politics for the sake of my health. But that leaves me with like 4+ hours a day where my first instinct is to open the guardian or post on here or what have you. I need displacement activity so I’ve decided to embrace the hellworld, swim or die, neo liberal, always be gaining skills to avoid becoming obsolete lifestyle and learn business programming.

I can write beginner/intermediate SQL code but that’s it. But my brain doesn’t work remembering weird details eg I have to look up the code for the first of last month every single time even though I used it basically once a day for the past 2 years. So I’m look for language recommendations and super beginner tutorials geared towards business use. I tried a first steps python thing online but that got me printing hello world, counting to 10 and then abruptly stopped. Free resources preferred but if you had an amazing time with something paid I’ll go for it. PLz halp.

1 Like

Python is the way to go imo although it’s easier to figure out something to do where you can see the results and show them off in JavaScript on the web. Do you have a project in mind?

Check out Humble Bundle and see if they have any Python bundles at the moment… oh, they don’t, but they do have this:

Which has some beginner material for Python for cheap. There are also 1001 YouTube videos on it as well to help.

If doing this in the abstract is too boring or doesn’t stick you may want to think of an application you can use to do something for you at work, or something you used to do, write up what you want it to do and then start finding out how to do the different bits of it. My last go round at playing with Python I started to design a file parser; something that could read a delimited file and give some statistical read outs on the various columns. Things like min/max or avg, or most frequency distributions. The idea being it would be for checking the quality of user data and addresses. A task I used to do by visual inspection a few jobs ago. Lots of breaking that down and writing little test programs to do the individual bits of it.

No unfortunately. Just need a time sink and figured it may as well be productive.

Find by value is pretty much back to using some method that will iterate over a collection (in JS plain objects can also be treated as a type of collection, e.g. an array of key=>value pairs) and checking each item to see if it matches. So if you want to find the entry where field1 === 'baz' then you have to do something like this (there are a few different ways to loop over the hash entries, or values, depending on what you are looking for):

const obj = {
  ABC: {
    field1: 'foo',
    field2: 'bar'
  },
  
  XYZ: {
    field1: 'baz',
    field2: 'blat'
  }
};

const key = Object.keys(obj).find((k) => {
  return obj[k].field1 === 'baz';
});

console.log(key);
console.log(obj[key]);

If you don’t care about the ‘ABC’ key, then Object.values(obj).find(...) may be more direct.

This is too general to make specific language recommendations. Also this forum is almost entirely Javascript programmers so take those recommendations with a grain of salt. Without more info python is almost definitely a better choice.

C/bash programmer here ayooo

C was my first love. Don’t write much of it anymore though. I’ve probably written more Ruby than anything else this year. Javascriot second. Next year I need to learn some kotlin.

C can be a nasty language but its learning curve is surprisingly gentle. The std libs are not very big, and the language itself is pretty small and easy to learn. You have to think of a lot of things you’re not used to thinking about if you use higher level languages, but C is about as close to the machine as you can possibly get other than hand writing x86.

Practically though I’d choose Rust for any medium or large project that wanted C. And I’d use C++ for everything else because it’s just an amazingly solid language, even if I think it’s incredibly ugly code.

I meant more in the sense that the library is really tiny and well documented, the syntax is easy to read and understand, etc. Of course pointers and memory allocation is tricky but malloc() and free() arent really too difficult to use either. A lot easier abstractions than what is going on under the hood, for sure

Debugging is a total nightmare though.

Not true at all. Suzzer is Java. Goofyballer probably C++ or golang or Java or something. ChrisV is C/C++ I think. Jmakin is C/shell/dev ops. Dunno about grue, but I don’t think JavaScript is his main thing. Also doubt it’s well named’s main thing. Most of my experience is php, but lately aiming for python and have done some JavaScript/node.

I am literally only javascript because I’m too lazy to do more than one thing well.