Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Alexander Praetorius
@serapath
also you can replace the jquery command in the end with document.querySelector('.container').innerHTML = "<div class='well'>"+html+"</div>"
i don't know what is your error, but if you use fetch and document.querySelector, you can completely ditch jQuery, which saves you a lot of kilobytes and makes you page faster
if you get an error message, share the error message, but i don't think it's worth debugging jquery
dinesh
@1532j0004kg

getJson inside for loop issues...

I found some articles but still the answer is not getting correctly because the value is keep on changing ...

for example: sometimes 0 1 and sometimes 1 0
help me to resolve

This is my issues
Alexander Praetorius
@serapath
oh alright, i see what you mean.
dinesh
@1532j0004kg
Ya please
Alexander Praetorius
@serapath
if you want to use a for loop for async matters it's not so straight forward...
probably the simples way to manage is to use await
dinesh
@1532j0004kg
await and async ?
Nina Breznik
@ninabreznik
yep
dinesh
@1532j0004kg
wil giv a try
Alexander Praetorius
@serapath
;(async () => {
  // rest of your code
  // ...
  const container = document.querySelector('.container')
  for(let i = 0, html = ''; i < time.length ; i++) html += await grabSomeData(i)
  container.innerHTML = html
  // ...
})()

async function grabSomeData(i) {
  console.log(i)
  const finalData = fetch(...) // instead of $.getJSON(...)
  const length = finalData.length > 3 ? 3 : finalData.length
  for(let j = 0, html = ''; j < length ; j++) { ... }
  return html
}
dinesh
@1532j0004kg
:thumbsup: Love it! I have to learn
dinesh
@1532j0004kg
Can u plz tell how it differ from promise :confused:
it is using promise like structures
dinesh
@1532j0004kg
Ohh okay
Alexander Praetorius
@serapath
for example... when you get a promise, you need to do
  function getMyPromise () {
    return new Promise((resolve, reject) => resolve('123'))
  }

  var mypromise = getMyPromise()
  mypromise.then(result => console.log(result)) // 123
  // but you can also use await instead
  var mypromise = getMyPromise()
  var result = await mypromise
  console.log(result) // 123
  // or even shorter
  var result = await getMyPromise()
  console.log(result) // 123
... await is stopping the code execution until a promise resolves or rejects and then continues the code execution
dinesh
@1532j0004kg
Its like putting the async under control
?
I mean one of the purpose of async/await or promise
Alexander Praetorius
@serapath
yeah, it is helping in a lot of use cases to make it more readable i guess
dinesh
@1532j0004kg
Great! Thanks for your valuable time
agatsoh
@agatsoh
I found these books to be a good ready reckoner
What sources do you recommend to write professional, industry ready Javascript code ?
Nina Breznik
@ninabreznik
I am personally passionate about writing super minimal code with no framework, so called vanilla js. And for this basically reading other people's code and building stuff using these techniques ;)
Mariana Meireles
@marimeireles
@serapath yes, I'm currently living in Berlin, but the thing is that I'm not comfortable enough to host an event about js. even though the guide offer some good tips, I don't feel like I can do it, sorry :p
is the wizard amigos a group to study js, only?
Alexander Praetorius
@serapath

yes and no.
wizardamigos is about programming as the literacy of the future.
it's like reading/writing. any profession and generally participation in society is hardly possible for people who are not literate at all, even though once upon a time, not being literate was normal.

so coding in this sense will be used in any profession or context. Similar to how some people write cooking recipes or TV manuals or scientific papers or novels or daily news articles ....People will use coding for data driven journalism, big data analysis, controlling robots, making music, generating visuals or art installations, self driving cars or delivery drones, todo apps, surgery, cancer research, compute games, artificial intelligence, virtual reality or whatever - maybe cryptocurrencies or using p2p and/or blockchain to build alternative forms of companies or even government institutions... :-)

we believe in the web and javascript as a language to do all of this and we made it so that hosts are mostly key holders who don't have to know any programming at all.

we provide 24/7 remote chat support in this channel or on facebook too if most visitors come from there. we have the meetup group too and we can provide learning resources and suggest what to learn next.

@marimeireles so in this sense - don't feel shy if you never programmed yet and are yourself a beginner. That's not a problem at all and we had many organizers in the past like that :-)
agatsoh
@agatsoh
@ninabreznik What are some good repos on github that you recommend to study other peoples code ?
Alexander Praetorius
@serapath
@agatsoh i personally think our repos are always good to study ...and you can always check package.json of the repositories to find "dependencies" and then go and look for those modules and study the source code.
https://github.com/ethereum-play has quite a few ... but it really depends what you are looking for :-)
agatsoh
@agatsoh
Thanks a lot
Nina Breznik
@ninabreznik
@agatsoh I made alittle tutorial for our learners a while ago. It might be a bit slow if you're not a beginner, but you can click through to get the feeling => check Portfolio and then Quiz (they are part I and II) https://www.youtube.com/channel/UChZtgbTp4PGDfyKKHcjpp1w
Enoch Mbaebie
@EnochMbaebie
Welcome @marimeireles
xMartin
@xMartin
Hi! I've been at some of the meetups in Berlin a few years ago. Now happen to be in Lagos for vacation and thrilled to see you have a chapter here! Will try to show up tomorrow 😯
Anyone here from Nigeria?
xMartin
@xMartin
@EnochMbaebie ^
Enoch Mbaebie
@EnochMbaebie
@xMartin we will be glad to have you join Wizardamigos Nigeria, more details here...https://www.meetup.com/WizardAmigos/events/lgrrtqyzlbbc/
Nina Breznik
@ninabreznik
@xMartin Wow, this sounds exciting. Oh, I envy you for being able to join. Please, make some photos and keep us posted how's the scene like :) @EnochMbaebie, Martin is a super cool javascript developer and also a mentor, teaching here in Berlin for years, so this is really awesome to have him there <3
xMartin
@xMartin
@EnochMbaebie I confused the time because my meetup app is in German timezone. Coming now from Ikoyi.
xMartin
@xMartin
IMG_20190820_144713~2.jpg
Cheers from the Lagos chapter! @EnochMbaebie does an awesome job and has great energy. I'm happy to be here. To sustain this we need to figure out how to get access to free space and internet. I really feel there's a need for this kind of meetup in Lagos.
xMartin
@xMartin
IMG_20190820_172927.jpg
Enoch Mbaebie
@EnochMbaebie
Thanks sir @xMartin
Nina Breznik
@ninabreznik
@xMartin thanks for sharing. Any idea how it would be possible to find a free place? It would be great if we coukd also help and maybe connect to some organizations who would be willing to give their space in the evenings for a community event... Like co up in Berlin...
xMartin
@xMartin
I reached out to some contacts I have. Let's see. But Co.Up is special :pray:
Nina Breznik
@ninabreznik
@xMartin True story. In Taiwan they were in Mozilla community space for a year but now they meet in a coffee place like Starbucks... Are chains like this existing in Lagos?

I retweeted you now and I remember having one woman from the US working to help kickstart the local startup scene, so maybe she can help. Will ping her and let's hope we help somehow.

What brought you to Lagos? Are you otherwise still organizing OTS meetup?