Dear user, the ESP8266 and the ATMEGA328 are two different microcontrollers, you need to create a firmware for everyone one of them if you plan to use both of them for your project. If you plan to combine a UNO and an ESP8266 you have to implement a way to communicate them, we made that in our help article using RS-232 but you may use your preferred communication protocol.
Now, why did we make the tutorial using a MEGA? Because that board has more than one serial port, so you will be able to make debugs, but the tutorial is also possible to be followed using an Arduino UNO, simply declare properly the serial port.
Also in this link http://help.ubidots.com/connect-your-devices/connect-the-esp8266-as-stand-alone-module-with-ubidots2 , you say that you can use an UNO arduino but you could tell me if after selecting the generic module ESP8266 I can already record the code
You can use an Arduino Board to upload your firmware to your ESP8266, simply follow the steps for wiring up from the tutorial.