Looking for people to bounce ideas on Web Development

Hi there, I am looking for some advise pertain to web development.
As far as I know:
Django is a web framework based on Python and is based on MVT model
Node.js is a javascript based server and npm is a package manager and nvm is a version manager.
Markdown is something like a shortcut used to develop HTML.
I am currently prefered to use MACOS and Ubuntu 20.04 to develop some of these site, appreciate if anyone can bounce ideas with me.

I do all web development on macOS using these two components:

  • Ruby on Rails
  • Visual Studio Code with Git integration

Personally, I don't develop web apps using Python or Django, as I prefer Ruby on Rails because Ruby very user friendly and also Ruby is a fully object-oriented scripting language.

Cheers.

Yes, the reason why have to do development on node.js and django is because am base off a current framework and have to do customisation from there. Web development is tough work, have to read tons of documentations and errors may occurs while doing installation and debugging.

What are some of the common command need to be use for git?
So far I know git push, git pull and git clone only.
Managing version?

Do you write code using VSC as your core development environment and appropriate extensions to help you with syntax and debugging while coding?

git status
git stash
git merge
git commit

etc etc.

It helps if you use the git tools embedded in Visual Studio Code.

Yes I really like visual studio code. The extensions are quite useful as well. I especially like the syntax highlighting, the find all in reference where the function is use etc.

Do you use any form of linux alias to help you launch program or git command quickly?
For example I use:

alias python=python3
alias pip=pip3
alias pisort="isort --recursive ."
alias paflake="autoflake --in-place --remove-unused-variables --recursive ."
alias papep8="autopep8 --recursive --in-place ."

First one reason being python always confuses with python3.

No. I use git integrated into VSC for almost everything.

From the command line, I mostly use git pull and git status and git stash.

I let VSC (combined with private repos on GitHub) handle the heavy lifting for version control.

FWIW, I use Visual Studio Code and git daily; and develop code in Rails commercially (and remotely) for US-based organizations.

alias subl="open -a sublime\ text"

I see, how about any alias that you use to speed things up?

Also refer to my previous post.

Nope. I have no reason for aliases for web development, to be honest.

If I have some complicated commands to run, I just create a script can call the script.

Sorry not to be more chatty or excited about aliases :slight_smile:

I see, do you write any bash script or other script as such to aid with your development work? Wonder what is the software apart from VSC and the tools you used?

Yes, I write some bash, but I generally write scripts in Ruby not bash, to be honest, for anything other than very trivial scripts. Unlike many here, I don't find bash very robust for web dev and I prefer object-oriented scripting with public repos of a lot of code to use.


# This script runs the "ls" command

output = system("ls")

puts output

Do you use ruby command to interact with the system? I don't get it why people prefer to use python or ruby to interact with system call when a single call like ls from bash is faster? Is it because it is object oriented in nature?

You mean inside server-side web code?

I mean with the operating system itself, command like ls, run certain binary in the system, pwd, searching for files in os, etc. As far as I know Ruby is a programming language by itself, on Rails is more of a web development. Do people use Ruby as a standalone to interact with the OS like people do with python

Why do I need scripts for the commands when I am in the shell? That is not web development per se. That's local system admin. In that case, of course I use bash as my macos terminal shell.

I don't need bash scripts when I develop complex web applications. I develop code and test, all of it, in Visual Studio Code.

For example, when I wake up, I login, make a coffee and catch up on YT, then I login to my mac and I change into the root directory of the client's project.

Then, I do a git pull and make sure I am synced with my client.

Then, I type code . and of course VSC pops up and I'm working, developing for my client's back-office web app.

Does that make sense to you @alvinoo ?

I don't use bash for anything but very basic shell commands:

cd /directory/of/project
git pull
code .

And I am working.

On the server-side, of course there are basic bash scripts for backups, log file rotation, and the like, but I don't consider that web development. That's basic sys admin stuff.

Actually, I also test code using the rails console... but that's another topic :slight_smile:

So, I generally write the code in VSC, but often I will test it immediately in the rails console, which I enter in the macos terminal with:

rails c

Ok, got it so you are mainly doing web development on rail. For sys admin related task its best to stick to bash.

How is your experience using MacOS versus Ubuntu so far?
So far for me Mac, there is a lot of things I have to map.

alias subl="open -a sublime\ text"

For example, opening of sublime text isn't that straightforward and I have to go to the app directory and reference it.

I don't like the cmd button to cmd+v cmd+x to copy paste files and its sort of mess with my muscle memory when I am already used to windows command.

I don't like mac because the windows does not snap to pane like Ubuntu or Windows.

All these adds up sort of hinder my day to day task.

I only develop code using VSC on macOS; and only use Ubuntu in remote data centers as servers which I ssh into etc. I don't do any serious code development on the Ubuntu command line, but of course, I might vi something here and there; but not serious development work.

In fact, my rails client is running his back-office rails app on his local windows server, and he uses git on windows to pull any changes I make to his production app; etc. I refuse to work on windoze; but it's not a problem. Rails runs great on windows so the repos I push from macos to github works fine on windows (after we set it up with him at the windows command line).

Regarding my experience with macos. I am a big, huge, gigantic Apple macOS fan and only develop on macOS. I do not develop code on any Linux machine directly (unless it is some tiny shell script which I quickly vi). My workstation is macOS (currently a Mac Studio).

I use two monitors, one 34" curve ASUS gaming monitor and a smaller 27" Samsung curved monitor; but of course on macOS, you can have many monitors and work on all of them easily. I would use a third monitor, but it would block my sea view, and I value the sea view more than having another big monitor.