# Enjoying programming?



## Questionner (Dec 6, 2021)

Hey
If you do , what aspect , and why?


----------



## UpClosePersonal (Apr 18, 2014)

Assuming computer programming: 

I program cad and MS Excel.

I enjoy the cad programming because its LISP based which suits my P preference for changing/adding things right where and when the thought occurs to me.

The VBA programming is dryer and less a tool to support to on the fly creativity. 

It's gotten better over the 30 years I've been using it but still leaves a lot to be desired. 

Python is LISP inspired but steels away the flexibility of approach that LISP offers.


----------



## Questionner (Dec 6, 2021)

UpClosePersonal said:


> Assuming computer programming:
> 
> I program cad and MS Excel.
> 
> ...


LISP ? Can you describe the core principe of it (I'm actually fairly new to the domain , what I tried and enjoyed is Arduino ,which is based on Java)


----------



## bifurcations (Jan 31, 2021)

I enjoy programming. It's one of the very few things that can capture my focus pretty intensely for hours on end. I come close to getting what I really liked about physics with programming: there's this type of "crunch" you can get in your head that's really satisfying. It's like being a big dog and finally getting the right sized bone to gnaw on.


----------



## UpClosePersonal (Apr 18, 2014)

LISP = List Processing Language.
If you're familiar with Python then you're familiar with Lists.

VBA and Python act more like Arrays.

The LISP I use is customized for the AutoCad it's used in. A lot of the complexity of lower level programming is done away with.
Items in the list are accessed in 2 ways...index number or first item , last item, and all but first item. 
The great thing about LISP is that each function has a return value that can be immediately processed further in a daisy chain of functions
Example
Give me a numeric string 
Convert it to an integer
Add 1
Convert it back to a string
Then use that to pass to a command
In one line of code.

Common Lisp requires a deeper understanding of lower level programming than I have.


----------



## FaeSoleil (9 mo ago)

I like programming, personally, I guess mostly because I generally like creating things. It's a tool to me, the same way my writing or drawing is. A way of seeing the world and creating something in it.


----------



## Questionner (Dec 6, 2021)

UpClosePersonal said:


> The great thing about LISP is that each function has a return value that can be immediately processed further in a daisy chain of functions
> Example
> Give me a numeric string
> Convert it to an integer
> ...


You can do that with Java too , but with different functions ,though.
What I'm saying is , I still don't see the difference.
I'm not that familiar with python.
The differences I know are that there's no void in Python , and that having the lines , or function or definitions in a certain order Is not as an important factor as in Java (for instance, you can use a variable before defining it.).And no semicolons in Python ,of course.
OK, question : is there looks in Lisp (or python)?


----------



## UpClosePersonal (Apr 18, 2014)

Questionner said:


> You can do that with Java too , but with different functions ,though.
> What I'm saying is , I still don't see the difference.
> I'm not that familiar with python.
> The differences I know are that there's no void in Python , and that having the lines , or function or definitions in a certain order Is not as an important factor as in Java (for instance, you can use a variable before defining it.).
> OK, question : is there looks in Lisp (or python)?


Is Java = Java Script or something different?
Is Java compiled or does it require an application running to interpret it?
As far as I can tell. Java script evolved from C


----------



## Questionner (Dec 6, 2021)

FaeSoleil said:


> I like programming, personally, I guess mostly because I generally like creating things. It's a tool to me, the same way my writing or drawing is. A way of seeing the world and creating something in it.


I take it as a language that has its interseque caracterestics , whith a mathematically logic.


----------



## Questionner (Dec 6, 2021)

UpClosePersonal said:


> Is Java = Java Script or something different?


Yes ,JavaScript


----------



## Questionner (Dec 6, 2021)

UpClosePersonal said:


> Is Java = Java Script or something different?
> Is Java compiled or does it require an application running to interpret it?
> As far as I can tell. Java script evolved from C


It does require an applccation to run it


----------



## Questionner (Dec 6, 2021)

Questionner said:


> It does require an applccation to run it


Actually , here's what I just found :
"*Java can be considered both a compiled and an interpreted language* because its source code is first compiled into a binary byte-code. This byte-code runs on the Java Virtual Machine (JVM), which is usually a software-based interpreter"
From here:
https://www.google.com/url?sa=t&sou...QQFnoECA8QBQ&usg=AOvVaw3D7OpgK5Nrj8XwzO-Mpgwu[/URL]


----------



## UpClosePersonal (Apr 18, 2014)

One of the greatest joys of the AutoLISP I use is implied variable typing.
So there's no having to do that before assigning variables.
When you assign value to your variable, the type is implied.
if you assign 1 to a, a becomes an integer
if you assign 1.5 to a, a becomes a real number or float
if you assign "1" to a, a becomes a string 

You could even reassign a to a different value and type in one assignment statement


----------



## Questionner (Dec 6, 2021)

UpClosePersonal said:


> You could even reassign a to a different value and type in one assignment statement


I didn't get that


----------



## FaeSoleil (9 mo ago)

... so... uh. From someone more experienced:

Lisp is a family of languages, not a single language. They tend to be expression based and have a very distinctive and simple syntax based on lists (LISP is an acronym for *LIS*t *P*rocessor originally, but nowadays, it's more treated as a single word "Lisp".). Expression based means that you can write stuff like, e.g... (From the CLiki wiki, and simplified)


```
(defun fib (n)
  (if (< n 2) n
      (+ (fib (- n 1)) (fib (- n 2)))))
```
The syntax is a bit difficult because of all the parenthesis, but, breaking it down, note that the inner part `(+ (fib (- n 1)) (fib (- n 2)))` adds `(fib (- n 1))` to `(fib (- n 2))` and is basically doing what `fib(n-1) + fib(n-2)` would do in Javascript.

However, the entire code is structured differently because there is no `return` command, and the entire thing is more like one big mathematical equation. The outer part of the function basically looks like `(if (< n 2) n inner)`. The `if` function here has a return value - if `(< n 2)` is true, its value is the `n` variable directly, and if it's false, it's the result of that inner part I mentioned earlier.

In Javascript, you'd most likely write it this way instead:

```
function fib(n) {
    if (n < 2) {
        return n;
    } else {
        return fib(n - 2) + fib(n - 1);
    }
}
```
This is very different from the Lisp code: Rather than `if` being a function that chooses between two different values, it's more like a command that chooses between two different branches of code. One of those code paths has a command to return `n` to the calling function, the other code path has a command to return `fib(n - 2) + fib(n - 1)` instead.



UpClosePersonal said:


> If you're familiar with Python then you're familiar with Lists.


The reason Lisp is called a "list" language is because the syntax is entirely lists, not because it uses lists in a special way when you're actually writing code in it. To make a long story short, you could see the `(- n 1)` part as a list of the symbol `-`, followed by the symbol `n`, followed by the number `1`. This makes it easy to write code that generates or modifies other code, but that doesn't really matter for more basic programming.

The syntax of Java and Javascript is _way_ more complicated, so that so-called "metaprogramming" like that is harder and more complex.


----------



## SouDesuNyan (Sep 8, 2015)

UpClosePersonal said:


> Is Java = Java Script or something different?
> Is Java compiled or does it require an application running to interpret it?
> As far as I can tell. Java script evolved from C


Java is to javascript as car is to carpet. This means that they're completely different.

Java is compiled but the compiled files run on top of a java virtual machine (in other words, they are not directly executable from an operating system). javascript is usually executed in runtime in a browser.


----------



## FaeSoleil (9 mo ago)

Questionner said:


> I didn't get that


Java is further different from both Lisp and Javascript because it has static types. (Since you mentioned "void", I assume you program in Java, not Javascript - the two are very different, yeah)

The short way to explain the difference is that in Javascript, you can write this:

```
function test() {
    let x = 4;
    x = "a string";
    return x;
}
```
Even though you put a number in `x` originally, you can still put a string in it instead and then return it. The variable has no types, only values do. Therefore, there is no need for `void` or `int` or anything.

In Java, however, the compiler would complain about this and give you an error:

```
private static String test() {
    int x = 4;
    x = "a string";
    return x;
}
```
Since you declared `x` to be an `int`, you can't then set it to a string - and you can't return a string out of it.

This is harder to work with because the language can be less expressive in some ways, but makes it easier to write code without bugs - since you'd fix them when you compile the program rather than having to run it and check every time. Without this kinda language feature, it's easy to have a mistake where a variable should be one type but it contains a value of a different type - in a function that you only call in very rare circumstances. That can result in a bug in the program that you don't discover until you're actually using the program for something important.


----------



## FaeSoleil (9 mo ago)

SouDesuNyan said:


> Java is to javascript as car is to carpet. This means that they're completely different.
> 
> Java is compiled but the compiled files run on top of a java virtual machine (in other words, they are not directly executable from an operating system). javascript is usually executed in runtime in a browser.


The worst part is that the Javascript authors did that on purpose, for advertising... thanks assholes. 🙃


----------



## Questionner (Dec 6, 2021)

FaeSoleil said:


> Java is further different from both Lisp and Javascript because it has static types. (Since you mentioned "void", I assume you program in Java, not Javascript - the two are very different, yeah)
> 
> The short way to explain the difference is that in Javascript, you can write this:
> 
> ...


I see , It's true that sometimes , there are some annoying problems related to the type of a variable with Java.


----------



## Handsome Dyke (Oct 4, 2012)

I enjoy translating functionality into code, I guess because I enjoy using efficient languages and problem-solving.


----------



## HAL (May 10, 2014)

I'm a programmer and enjoy all of it. I will literally have a go at anything if it involves writing code or mark-up.

I specifically enjoy writing the logic that makes shit happen, and the mark-up that makes it viewable, i.e. the "in / out" stuff and all the in-between that decides what data should go where. I also like using OOP to the absolute maximum; I'll actively (and somewhat naturally now) hunt for places where I can reduce the amount of code I write, with various abstractions, inheritance and whatever other things that fall under 'polymorphism'. It sounds nerdy when I put it into words but really it's just a big, fun, never-ending jigsaw that just gets better as you make further refinements.

Some programmers enjoy things like architecture, design patterns etc. I'm not so interested in that because it can often feel more like an arbitrary academic exercise that doesn't ever translate directly into real life. However, as the years have passed I notice my work adheres to a lot of core development principles without even realising, so there is something to be said for the theories, and something to be said for the fact that I've naturally absorbed it as time goes on.

My current area of work is web development, like most programmers out there. For a while I was averse to this because I thought it's "too common", and was more interested in desktop or mobile app development, but nowadays the internet is so ubiquitous that I actually feel much more capable and more 'powerful' using web development tools. I'm currently working on a pretty large web application which - assuming I've done it right - will easily port into mobile and desktop versions. I really love how it has become possible to write websites using almost exactly the same software development principles as normal applications (the primary point being state management).

I work in .NET, which basically means C# and all things related to it. For web dev this means hefty doses of Javascript and Typesript too. Also SQL in large quantities at times. C# has a vast ecosystem, on par with Java, but for some reason the general public are mostly only aware of Java.


----------



## MadMaxSDP (2 mo ago)

I was programming for a while in c and machine. I stopped because I was having a lot of neck pain and switched careers. Part of me wants to go back and I enjoyed it but I couldn’t keep my weight down and my body right and I’m the type of person that can’t stop thinking about a problem until it’s solved so I would code for days without sleeping.


----------



## Questionner (Dec 6, 2021)

MadMaxSDP said:


> I am the type of person that can’t stop thinking about a problem until it’s solved so I would code for days without sleeping.


This .Exactly that . Especially when the problem is elegant.
One of the reasons I enjoyed it ,is that I don't need a large set of theory.Rather ,I can use the little amount of stuff I know to design and construct my personal solution .
Of course ,sometimes you need theory , but at my beginner level , it's not too hard to find resources and assimilate.


----------



## Questionner (Dec 6, 2021)

FaeSoleil said:


> This makes it easy to write code that generates or modifies other code, but that doesn't really matter for more basic programming.


Like I.A?
Generally ,thank you ,I get it better now ,though I still don't fully visualize the result of these differences.


----------



## recycled_lube_oil (Sep 30, 2021)

HAL said:


> I'm a programmer and enjoy all of it. I will literally have a go at anything if it involves writing code or mark-up.
> 
> I specifically enjoy writing the logic that makes shit happen, and the mark-up that makes it viewable, i.e. the "in / out" stuff and all the in-between that decides what data should go where. I also like using OOP to the absolute maximum; I'll actively (and somewhat naturally now) hunt for places where I can reduce the amount of code I write, with various abstractions, inheritance and whatever other things that fall under 'polymorphism'. It sounds nerdy when I put it into words but really it's just a big, fun, never-ending jigsaw that just gets better as you make further refinements.
> 
> ...


I recently discovered design patterns in my studies. The SIngleton Pattern actually amazed me.


----------



## HAL (May 10, 2014)

recycled_lube_oil said:


> I recently discovered design patterns in my studies. The SIngleton Pattern actually amazed me.


I ctrl-C ctrl-V the singleton pattern from stackoverflow any time I need it

Some folk might say I'm lazy or unacademic, and they may well be right. The point for me is that I know what a singleton is and when/where to use one. Implementation doesn't need to be memorised (though I would probably be better equipped overall if I was able to write one myself off the bat).

I don't know many more though, like factory pattern or other patterns. If/when I need them, I'll use them. Again, I feel like I should know these, and your comment has prodded me to look into it more seriously.

That being said, in 6 years of being a programmer, and with 4 different jobs in my history, I've never been asked anything about design patterns beyond a surface level acknowledgment of their existence. I think a lot of academic software development knowledge is less of a requirement than some people are led to believe. Particularly CS students wanting to find their first job. They obsesses over design patterns and solving leetcode algorithmic problems.

Oh ace I just googled the factory pattern and discovered I already make factory methods all the time, ha! Win


----------



## recycled_lube_oil (Sep 30, 2021)

HAL said:


> I ctrl-C ctrl-V the singleton pattern from stackoverflow any time I need it
> 
> Some folk might say I'm lazy or unacademic, and they may well be right. The point for me is that I know what a singleton is and when/where to use one. Implementation doesn't need to be memorised (though I would probably be better equipped overall if I was able to write one myself off the bat).
> 
> ...


Although I am only studying Comp Science at the minute and do not have industry experience, I work closely enough with the development team at work, to see what they are working on. And yeah, I agree, Academia does seem to obsess over various things. As far as Algorithms go, I do not know if when applying for work in the UK as a dev, I will have to do Leetcode style challenges or not. When I spoke to our Senior Dev before he left, he said he had never had to do that, but did get given the spec for some system to code up and then be questioned about during interviews.

But for my companies dev team, most of the issues I see, generally seem to revolve more around the Azure infrastructure and setup. The coding side of it, does not seem as complex as my studies would have me believe coding is. 

I am hoping the fact I have 7 years experience in Azure and am also doing a cloud hosted system using Kubernetes and some RESTful architecture helps me when I come to transition to dev next year I am not going for anything super fancy in my final project but it will be based on Industry dev stacks and tech.


----------



## FaeSoleil (9 mo ago)

Design patterns are great because you learn how other programmers have solved common problems before in the language you use. Is just... also, the "other side" of design patterns is that a lot of them tend to reveal missing features or flaws in the language.

I do personally recommend that, like... pretty much every programmer learn a bit about programming languages not so common in the industry just to know what's possible and know what's a limitation of the popular languages. Relatively interesting examples: Haskell, Common Lisp, Prolog, Erlang, Rust (on the borderline, since it's starting to cross the line into being a industry language)


----------



## recycled_lube_oil (Sep 30, 2021)

FaeSoleil said:


> Design patterns are great because you learn how other programmers have solved common problems before in the language you use. Is just... also, the "other side" of design patterns is that a lot of them tend to reveal missing features or flaws in the language.
> 
> I do personally recommend that, like... pretty much every programmer learn a bit about programming languages not so common in the industry just to know what's possible and know what's a limitation of the popular languages. Relatively interesting examples: Haskell, Common Lisp, Prolog, Erlang, Rust (on the borderline, since it's starting to cross the line into being a industry language)


Have you ever tried BrainFuck?


----------



## FaeSoleil (9 mo ago)

recycled_lube_oil said:


> Have you ever tried BrainFuck?


Brainfuck is like, the esoteric programming language people talk about when they haven't gotten sucked into that rabbit hole full-scale before. I wrote a toy interpreter for it, and got sucked into a project working on an optimizing compiler for it for a month or so (not because it's useful for anything, but because it's fun to see if you can make an absurd language kinda-fast).


----------



## Whippit (Jun 15, 2012)

I enjoy it well enough, been doing it for a long time. I least like the business/project coordination aspect of the the job, but using the skill itself can be quite fun. I'm less enamoured with the tech culture and the meta aspects of language appreciation and more interested on the ends they're employed to solve. It's neat to create new things, solve problems in creative ways and make painful things easy. I do things in my own time for hobbies, Arduino, embedded C, etc. Professionally I'm primarily doing backend event driven work in nodejs, with python and bash scripting for some tooling. But I think I'm ready to get out of the racket professionally, trying to figure out my exit, I feel like continually employing my robot-brain as oppressive.


----------



## fading_shadows (2 mo ago)

I really enjoy when I can get something to work for my modest needs. But trying to learn/accomplish more complicated tasks is pretty painful and tedious for me. I don't seem to have a natural aptitude for thinking in layers of abstraction.


----------



## Questionner (Dec 6, 2021)

fading_shadows said:


> I really enjoy when I can get something to work for my modest needs. But trying to learn/accomplish more complicated tasks is pretty painful and tedious for me. I don't seem to have a natural aptitude for thinking in layers of abstraction.


It's helpfulness.And it's fun when simple.
I agree. It's always fun when you actually get it.


----------



## recycled_lube_oil (Sep 30, 2021)

fading_shadows said:


> I really enjoy when I can get something to work for my modest needs. But trying to learn/accomplish more complicated tasks is pretty painful and tedious for me. I don't seem to have a natural aptitude for thinking in layers of abstraction.


When I left school, I went to University and did Software Engineering. Although I blitzed the programming/coding modules and the assignments given to us (30 second animation hardcoded in C++ OpenGL, doubly linked list class in C++, Algorithms and Data Structures), things like system design, database design, etc, I could not relate to anything and I flunked. Now many years later I am redoing my degree via Open University. After 10 years of working in infrastructure for tech companies, the system design aspects are a hell of a lot clearer and make more sense due to the exposure I have had to various systems.


----------



## Ssenptni (Mar 26, 2021)

I enjoy wanting to do something I don't know how to do, putting it aside to study fundamentals for a year, then when the issue comes up again solving it fluently off the top of the head with no effort.


----------

