Live data from Hacker News

Using Code Snippets in Chrome Developer Tools

alexkras.com

21–30 of 43 posts

Re: Using Code Snippets in Chrome Developer Tools

#21
post #9

Earlier quoted context omitted.

The browser has always been the one of the easiest ways of tinkering with programming, but these days our browsers come with sophisticated developer tools unlike anything else installed on an average person's PC. Back when I didn't know anything about compilers I wanted to write 'C++' but didn't understand how I could produce an executable, I instead saved html and js into folder and loaded them up in the browser --…

1980s: Computers come with a BASIC interpreter 2000s: Computers come with a web browser that can run JS 2010s: Computers come with a web browser that can run JS and has some other tools But what was available in the early 1990s, when IBM-compatible PCs had become cheap enough to have at home, but ~everyone ran DOS+Windows? I don't remember there being any way (unless you count BAT files) to easily get started writing…

Turbo pascal and borland c..

Re: Using Code Snippets in Chrome Developer Tools

#23
post #21

Earlier quoted context omitted.

1980s: Computers come with a BASIC interpreter 2000s: Computers come with a web browser that can run JS 2010s: Computers come with a web browser that can run JS and has some other tools But what was available in the early 1990s, when IBM-compatible PCs had become cheap enough to have at home, but ~everyone ran DOS+Windows? I don't remember there being any way (unless you count BAT files) to easily get started writing…

Turbo pascal and borland c..

Yeah but those didn't come with the computers, you had to install them separately.

Re: Using Code Snippets in Chrome Developer Tools

#24
post #5

In the 80s home computers shipped with a programming language as their OS (BASIC language to be precise) - today the browser dev tools are the closest equivalent. You can use them on any PC with no additional software - wished it was made more obvious so everyone could experiment with programming like those of us who got their first computer experience 25-30 years ago could do.

Ever watched "The Birth & Death of JavaScript" ?

https://www.destroyallsoftware.com/talks/the-birth-and-death...

It's a future prediction of how "javascript lost but programmers won".

Re: Using Code Snippets in Chrome Developer Tools

#25
post #15

Earlier quoted context omitted.

1980s: Computers come with a BASIC interpreter 2000s: Computers come with a web browser that can run JS 2010s: Computers come with a web browser that can run JS and has some other tools But what was available in the early 1990s, when IBM-compatible PCs had become cheap enough to have at home, but ~everyone ran DOS+Windows? I don't remember there being any way (unless you count BAT files) to easily get started writing…

MS-DOS came with GW-Basic and later QBasic, and the latter lives on in QB64: http://www.qb64.net/

Thanks for mentioning QB64. While I haven't tried it out (yet), having an integrated IDE and DOS emulation does sound pretty cool for nostalgia!

Personally, many many years ago when I was fed up with QB's limitations, first versions of FreeBasic[1] were published and I made the switch. I haven't been following its development closely for some years now, but it seems the language has come a long way since then, e.g. supporting OO. It still can be told to behave QB-compatible, though. Maybe this is interesting for anyone looking for an open, more modern implementation of Basic.

[1]: http://freebasic.net

Re: Using Code Snippets in Chrome Developer Tools

#26
post #20
post #5

In the 80s home computers shipped with a programming language as their OS (BASIC language to be precise) - today the browser dev tools are the closest equivalent. You can use them on any PC with no additional software - wished it was made more obvious so everyone could experiment with programming like those of us who got their first computer experience 25-30 years ago could do.

But if you have internet access then you can get almost any dev tool and documentation, but if you don't have access then you probably don't have Chrome or Firefox, and even if you have the browser, it has no offline documentation. The 80s was different because internet access wasn't so widespread.

The dev tools built into browsers also tend to be rather bloated and sluggish; opening Firefox's debugger on my 2010 Core2 Duo laptop pegs the firefox process at 40% CPU just idling. Scrolling is painful.

Passable for making a quick change to test an idea but I wouldn't use it as an introduction to an IDE.

Then again I suppose I should be grateful it runs at all; Servo browser won't start because it requires a certain level of OpenGL support from the chipset. That makes me worry about the future hardware requirements of browsers and is another reason for splitting dev tools off from the client UI.

Re: Using Code Snippets in Chrome Developer Tools

#27
post #3
post #2

Not sure this is "hidden". Anyone who has spent ten minutes poking around chrome dev tools is likely to have discovered this.

yeah, I love to put little tools i write in here like Angular js debug functions

Any examples you'd care to share?

Re: Using Code Snippets in Chrome Developer Tools

#28
post #20
post #5

In the 80s home computers shipped with a programming language as their OS (BASIC language to be precise) - today the browser dev tools are the closest equivalent. You can use them on any PC with no additional software - wished it was made more obvious so everyone could experiment with programming like those of us who got their first computer experience 25-30 years ago could do.

But if you have internet access then you can get almost any dev tool and documentation, but if you don't have access then you probably don't have Chrome or Firefox, and even if you have the browser, it has no offline documentation. The 80s was different because internet access wasn't so widespread.

>, but if you don't have access then you probably don't have Chrome or Firefox, and even if you have the browser,

Not sure why your reply is framed in terms of Chrome & Firefox.

If one buys a Mac laptop with no intention of connecting it to the internet, the preinstalled OSX will include the Safari web browser which has the Web Inspector tool.

If one buys a Windows pc that will never connect to the internet, it will include Internet Explorer which has the F12 Developer Tools.

The web browser (regardless of flavor) dev tools is still the closest equivalent we have today to the BASIC that was preinstalled in the ROM of 1980s home computers.

> it has no offline documentation.

The BASIC included with Commodore 64 and IBM PC also didn't include offline documentation (in the sense of copying MSDN doc library from DVDs on to local harddrive). Unless you meant "offline" such as the spiral bound hardcopies that came with the 1980s computer. Yes it's true that one can't go to Barnes & Noble to buy a "Web Browser Dev Tools 2016 for Dummies". On the other hand, the dev tools change so quickly that no publisher would find it profitable to sell books that would be out of date before it hits the physical shelves.

Re: Using Code Snippets in Chrome Developer Tools

#29
post #19
post #9

Earlier quoted context omitted.

The browser has always been the one of the easiest ways of tinkering with programming, but these days our browsers come with sophisticated developer tools unlike anything else installed on an average person's PC. Back when I didn't know anything about compilers I wanted to write 'C++' but didn't understand how I could produce an executable, I instead saved html and js into folder and loaded them up in the browser --…

> unlike anything else installed on an average person's PC MS Office, Open Office both come with an embedded IDE.

Visual basic for applications (VBA) was really useful for making very basic stuff, like putting code into spreadsheets. Unfortunately you couldn't write a standalone program from it that has an independent ui. But as a high school student, it was good enough as a tool to by pass the security put on the school labs,e.g, you can launch programs on a CD ROM. I remember the fun times where bunch of friends were able to play age of empires LAN games, even though the computers were locked down.

Re: Using Code Snippets in Chrome Developer Tools

#30
post #22

Pretty cool. But surely not a patch on Firefox's built-in JavaScript editor, which has autocomplete and inline documentation: https://developer.mozilla.org/en-US/docs/Tools/Scratchpad That said, something missing from both is an easy way to import and export the code.

Chrome Dev Tools' editor has great autocompletion, and has done for a very long time. Also, you can 'map' assets to local files so live modifications can be saved without needing to import/export.

Dev Tools are what keep me using Chrome at work, they really are unparalleled.

Post reply on HN