When I started going to clubs, I fell back on the ballroom dance steps I'd learned in my teens. That was sort of overkill, but it gave me something to think about until I conquered my anxiety. Just move your feet to the beat, keep your upper body relaxed, and don't think about it too much - nobody else is!
If you keep dancing you will develop more of a vocabulary over time. Watch what other people do, maybe add a little of that flavor to your own motion. Then shut your eyes and see what feels good. Don't take it too seriously.
All of these are cultivated via the "drill it til you kill it" program, so it's maybe less important in the early days to master the standard model and more important to work any 2 to 5 steps that you see and like and get them into a sequence that feels balanced, smooth, repeatable, etc... while developing a great sense of where your body is in space, how its moving, and where it can be next (without injuring yourself or others).
As a nerd myself, I've gravitated towards hobbies that were somewhat methodical, that one consciously learns -- and swing dancing has definitely been among the most fun.
My advice is to ask some close friends to go dancing with you. Stand in a group, do whatever you want, your friends aren't going to judge you. Focus on having fun. Make it silly if you want to. If you do that, everyone around you will have fun, too.
There are transferrable basics (though, unlike computing, the minimum set of prmitives to cover the whole space is quite large), but, I think it would be difficult to pick them up outside of the context of particular styles.
More specifically, go to the clubs you like, see what others do, try it at home.
Swaying with a beer bottle in your hand is a popular entry point.
Try to not be self-conscious - people really aren't going to care.
You won't be Turing-complete. If the DJ inserts YMCA or Macarena something else with well-known choreography, you'll have to pick up the larger pattern.
I don't as-of-yet know you; you don't as-of-yet know me; so my response is based on the very limited amount of information I am able to infer from your question...
What I am able to infer (and please correct me if I am wrong!) is as follows:
1) You are (predominantly!) a left-brain type of person. That is, you like STEM subjects (Science, Technology, Engineering, Math, Programming, etc., etc.)
2) You want to not just participate effectively in, but become a master of what can be thought of as a predominantly right-brained (Art, Music, etc.) talent, that is, dancing...
3) That you are a novice, a neophyte, a beginner -- with respect to dancing, specifically, nightclub dancing -- which you wish to get really good at.
Now, if any of these inferences are incorrect, then kindly correct me, and/or provide more information!
OK, let's get started!
First question:
Is walking, actual walking, like walking around, perambulating, walking around -- is walking dancing?
?
If the answer is "no" -- then I have an exercise for you to try! What I want you to do -- is to put on your favorite dance music (that is, music with a clearly defined beat to it) -- and without thinking about it -- to walk around! Like think of something different other than your walking... or attend to some task while walking that still requires you to walk -- while still listening to your favorite dance music with its beat! Now, after you've taken your conscious attention off of your walking for awhile and walked around a bit with the music playing -- put your conscious attention back on your walk! You should notice -- that the speed of your walking, the rhythm of your pace -- has precisely lined up (is in sync!) with the beat pattern of the music! In other words, if you're not thinking about it, not consciously trying to adjust the speed/rate/rhythm of your walking -- then you'll find that the beats and the moves just "get in sync" naturally! So now the question... What is this phenomena, and why does it occur? You see, this phenomena is latent to every human being! Every human being will automatically do this, that is, get in a "sync" with music -- but in order for them to do this, the song has to be catchy, it has to have a beat, and the human has to not consciously try to control their walk! Another example without walking: You could listen to your favorite music, and tap out a beat with a pencil or pen on a table! Or same thing, but use a drumkit! (Drumming, is incidentally, sort of like the "2D version" of dancing -- which is sort of the "3D version"!) You see, being able to follow a beat rhymically -- is the key infrastructure, the key building block, the cornerstone -- to all forms of dance which follow! It's sort of like the Y-Combinator or LISP Atom or NAND gate or 1 or 0 -- the building block for all that follows! Will that knowledge turn you into John Travolta or the most famous dancer on YouTube overnight? Not likely -- but it's lesson 0.0.0 in "understanding Dance" -- the most fundamental building-block! There's more to this -- there's a lot more! If you're interested, why not shoot me an email: peter.d.sherman@gmail.com -- and I'll tell you what else I know...
2. Follow the music's rythm
3. Don't touch anyone else
4. Don't spill your drink