I'm at a computer where most ports are blocked. Is there still a way to access freenode to ask about programming questions through some webinterface?
Have you tried http://webchat.freenode.net/ ?
From what process explorer shows, it does not look like firefox uses any IRC specific ports but HTTPS.
For other IRC networks, you could give http://www.mibbit.com/chat/ a try. I couldn't get it to connect to freenode because mibbit seems to be explicitly blocked there.
It's slightly more advanced, but if you install your own copy of the ZNC IRC bouncer (http://znc.in) or find someone else to host it for you (there are other bouncers out there as well), you can connect to the bouncer instead and it then proxies IRC traffic to you. I run znc on Linux but there is a Windows port out there too a friend has run. If you listen on port 80 or 443 you're more likely to get through, but sometimes just a non-IRC port is good enough since many places explicitly block the IRC ports Svish mentioned due to potential botnet activity (or time-wasting).
This of course requires your own computer where you can control inbound traffic (to listen on port 80 or 443) and run znc continually. But it can do some nice things like allowing you to connect from an unlimited number of clients simultaneously, using one nickname and being in all the same channels. It can also save a buffer while you're disconnected from znc so when you connect (from any client) you get a reply of the last "x" lines (whatever you specify) and can catch up. It can also log chats, and it's great for connecting from mobile phones like the iPhone especially because of the buffer (since the iPhone would lose history every time you switched apps otherwise).
So...a little more complex of an answer, but if you're a heavy IRC user it's probably worth the hassle of getting it set up and configured because it's quite powerful. Znc can let you connect to it in unencrypted and SSL encrypted modes depending on how you set it up (the connection to the IRC server is separate).
If you use ZNC and an iPhone, you can compile the Colloquy plugin for ZNC and then ZNC will also let you set up Push notifications to your iPhone for mentions of your username (by default) or other watch words (configurable through messaging *colloquy on the ZNC server). This requires using the Colloquy iPhone app as well.
Tried any of the alternative ports?
All freenode servers listen on ports 6665, 6666, 6667, 7000(SSL Only), 7070 (SSL Only), 8000, 8001 and 8002. -- Freenode
A port is absolutely needed to connect to a service over the network. Without a port you cannot make a connection, it's how the TCP/IP suite of protocols work.
One way around it is to use a web chat, since port 80 and 443 for HTTP(S) traffic will probably work, but you won't be able to use a standalone client if the appropriate ports are blocked.