Trick for new coders

So, I’m only on my 12th day of my 100 day challenge and am loving learning. Check my other posts to see my projects so far. Like most everyone, I’ve been using codepen to write my code and that was great, for a while. But, I found myself switching views A LOT to see how things were coming out. Anyway, I found it was getting in the way of writing code so, I wondered if there was a better way to write code on my pc locally, rather than online. Of course, we all learned on day one that we could write code it Notepad so, the options for writing code are unlimited. The best free solution, for me, I found was Notepad++ It has some useful tools just like code pen for writing code quickly. But, the I was having to load my code to code pen if I wanted to make on the fly changes and see them happen in real time. Now, I’m sure there are a bunch of programs and app like codepen that you can run local but, the last thing I need when trying to learn a computer language is to have to spend a few days learning a piece of software first. That said, I could obviously minimize my editor and load the page in my browser. Once again, inefficient. I wanted to see my changes in real time.

Then I thought about the solution. I write my code on my desktop. I have an old laptop on that same network that I use to watch youtube and listen to pandora. So, my solution was to use Notepad++ with an autosave feature. I saves every 30seconds. Then I gave access to the folder with my html to my other pc on my network. I went to that folder on my laptop. I loaded the page in my browser and it obviously came right up.

The next step was, since my code was now autosaving every minute, I need the browser(chrome) on my laptop to refresh to keep the page I’m viewing current with the code I’m writing. To do that, and basically give myself “liveview” like codepen pro, I used EasyAutoRefresh(Extension Play store) for chrome to reload the page every 30 second, just like my code. So, now I’m writing code on my desktop, and it appears on my laptop within 30seconds. You can change the speed if that’s too slow for you.

If this sounds like a good idea and you need some help setting it up, let me know. Happy coding!

You can use Visual Studio Code and install an extension like Live Server which will run a local server with your current folder, then making any changes to the code will automatically refresh the browser to reflect the changes.

1 Like

Thanks. I prefer separate pc’s, making live server not necessary. I don’t need to run a server because it’s in the same network and I have access to the containing folder. I just open it with Chrome. No extension needed. And, Visual Studio code is exactly the type of program I’m trying to prevent having to learn all the tricks on, when Notepad++ works well.

But, thanks for the input. Maybe once I’m further into my coding journey, I’ll have use for something more than Notepad++ but, it has everything I’ve needed so far. I’m sure Visual code is sweet and has all kinds of bells and whistles. And live server can be set up a million different ways. That’s great if that’s what you’re looking for. The point of my post was to show the absolute most simple solution. Notepad++ with autosave and Chrome with Auto Refresh.
Nice to see another point of view though.:slight_smile:

nice problem solving :+1:

1 Like

Double monitors or virtual desktops and live-server(or some other hot-reloading server) is my way to go personally.
Stackblitz with share url provides hot reloading between anyone anywhere on anything, stuffs magic! Great way to test your prototype code/basic app on mobile.

Also @dsychin was talking about VSCode not Visual Studios. I’d argue VSCode is hands down the best editor out there, especially for web development (webstorm is a close second, but isn’t free and is heavy). VSCode is lightweight, powerful, well maintained (by Microsoft), and has the best extensions and community out there, also its cross platform and runs the same on all operating systems. (Sorry but notepad++ is a windows only app, and its community isn’t anywhere near any of the open source editors)

30 seconds is too slow for any serious work. 30 seconds for every change would be like cutting your daily productivity in half, developers can always do better! If we are talking about a Java spring app, 30 seconds for a full re-build of a spring project is “acceptable”, but for web development 30 seconds is molasses.

So I mean no offence, but to say this is the simplest solution is incorrect. I’d argue the simplest and most optimal solution is the following:

  1. Always available without installing anything, regardless of hardware specs
  2. Live-reload automatically (not even on save)
  3. Excellent tooling
  4. Dual monitors support
  5. Offline support
  6. Easy to use

(Stackblitz does all of these, but I’m not advertising it, it’s just magic :laughing: )

I will commend your ingenuity, but I must point out there are always better ways to work more efficiently.

I use dual monitors(actually 4) but, I also use dual pc’s connected by Input Director. So, Shared folders and Chrome works fine for me. I’m just learning so, 30 seconds was fine. I just cranked the refresh on Easy auto refresh to 5 seconds to see it happen quicker. And Notepad++ now saves every time it loses focus, or 30 seconds, which ever comes first. Thanks for the input though. Once again, I’m not looking for the biggest and best editor. I’m looking for one of the most simple, that works well. Notepad++ covers that for me. Notepad++'s community doesn’t really affect me, as I’m only the one person and I use Windows at the moment. I’m sure I’ll switch to Linux at some point but, not today.
30 second was fine and most times it still is. I’ve been coding for all of 11Days. I have to look up half the changes I make. But, as I said, I’ve sped that up. I don’t know what you mean about not installing anything since, don’t I have to install your solution? I’m using dual monitors, Since I use Input director and I actually have 4 monitors(2 on each pc, all wall mounted) but, I wanted it loaded on my other pc. Already had Easy autorefresh, since I’ve been using it for 3 years anyway, already had Chrome, since it’s my browser of choice at the moment. So, I installed Notepad++. Seems pretty simple to me.
Either way. Your way sound fun too. Thanks for the input.