Bedfordng's Posts
Nairaland Forum › Bedfordng's Profile › Bedfordng's Posts
1 2 3 4 5 6 7 8 9 10 (of 105 pages)
codeigniter:You don't even get my point at all. I don't understand your definition of clean code as one can still write clean code with FBV. The clean code you are even referring to with CBV, is it not codes written under the hood for the view it self. The only difference is you are seeing most of what you wrote with FBV. So the likes of flask and fast API that does function based views means someone cannot write clean code with it. |
Not bad for a start. I can see you love using class based views. My advice would be for you to get into how things works under the hood with Django. Try use function based views on some functionalities in your project to see why some things worked the way it does. Class based views prevents you from seeing the actual picture of how things works under the hood. Get your hands dirty with some function based views. Don't limit yourself to only class based views as it can be tempting when you discover it ease development. |
LUAN1:will advice you to just keep your money and save more to buy a pc with SSD because you will cry at the end when after a while, it start lagging when you boot or use some softwares. I only recommend HDD pc for those who just want to check email, use Microsoft word, excel and browse the internet. But if you want to use it for stuffs like programming, graphic, video editing etc, you better get pc with SSD to save you future regret. |
Probably you could create a model called DepartMentTimeTable and another model called TimeTableDetails . Then use tabularinline to add TimeTableDetails to DepartmentTimeTable through modeladmin. With this you can keep adding more fields for the timetable. This is just a suggestion. You can fine-tune with what you want. |
First make sure you added the following to your settings py file and point it to the appropriate static directories. STATIC_ROOT STATIC_URL MEDIA_ROOT MEDIA_URL STATICFILES_DIRS when added, run the manage.py collectstatic command . |
What you need here is cronjob if you want it to run the check for those specific period. With this once it's time, it runs the check and do the needful for you in the background . In your case, you will create a Cron job to run every 5 days, then create another one to run every 3 days. |
TheTraveler:YouTube has lots of video on this. One of the video is what I used. |
TheTraveler:for now I use Ubuntu via virtualbox. |
qtguru:op should follow this advice if he can but as you know, users often love windows. Using Linux for a while now has opened my eyes. It's like killing multiple birds with one stone as it gets you closer to server tooling and using modern achetechtures without stress. There are some tools that will get you frustrated or just doesn't work on windows and there it is available in Linux for free in multiples. But the truth is , at times you just need windows for other things. |
airsaylongcome:of course. But do i really need to write those algorithms to be a Dev because it would mean reinventing the wheels rewriting forloop, if else statement, hashing and lots more others algo. The answer is no. What I am trying to say is that most tooling comes already with its algorithms which we make use of without even knowing. Learning DSA gives you indept knowledge on how this things works under the wood and makes you better programmer. But it is optional. |
FaruqMadridCr7:knowing maths or not doesn't necessarily mean you cannot be a top notch developer. You don't have to know maths to become good. Most important thing in programming is thinking logically and knowing how to apply them optimally. There are lots of programmers who doesn't even graduate in maths related field working in most of this top companies . Some of them studied art and other non science related courses. It's just a matter of your focus and will to learn as you progress. If many developers go with this assertion of you need maths, they would have ended up not taking chances. So Don't let what is being written here discourage you. If your target is not to write algorithms, you don't really need advance maths and science. |
Nice to see you have created something for a start. Although I was hoping to see some of the functionality the site has. I can see the sign-up and login which is usual Django form. Try and sprinkle some JavaScript validations on sign-up and login to prevent users from stressing the server and database at least because as of now when you type just one letter and click the button to login or sign-up, the form send the request to the server thereby stressing it. This is where JavaScript can help. Do yourself the favour to learn it because it will really help you in the long run. If you already have the knowledge, then use it. |
Babyprogrammer:what he is trying to say in layman's term is that you didn't use challenges in your URL when accessing the view If you wish to just access the view from example localhost:8000/January Then you have to remove the challenges from the URL py file in the folder where settings is located. So since you used path("challenges/", include("challenges.urls" ), Change it to path("", include("challenges.urls" ), |
From your screenshots, all looks good. The issue could either be from the way you are trying to access the url. Seems you are visiting the URL using just localhost:8000/January You have to go through localhost:8000/challenges/January for it to work. If you can screenshot the URL path you try to use in accessing the view. Or better still, try and add comma in the URL path since it is a list. |
Your code is moving to the next line but you just can't notice since there is no break statement. All you need to fix this is to add a break statement after the print under the if statements. Also you might want to add an if statement to check if users enter something. |
I was surprised to see vtpass running Google AdSense on their business site. This is not only killing but it is not professional to say the least. Navigating the site is hell as the distraction caused by this adverts is not encouraging. Both from the top and bottom and side, I find it hard to navigate the portal and I believe other users would be experiencing same thing. Their portal is not a blog and they should know that. Why running advert on the site and sacrifice user experience for few $$. This is killing the user experience that should have been one of their core value. I barely click on anything as most times the ads covers some part of the navigation. It's annoying to see that a professional platform of such would sacrifice user experience for Google AdSense. They are not even aware that they are giving their competitors access to run AdWord ads and only target their site, thereby enabling their users to click their competitors ads. If they continue like this, only time would tell. It's unprefessional for a site selling a service to run third party ads since users are using it. If it is a blog, it's a different case. I have noticed other platform making the same mistake. Wasn't expecting vtpass to involve in such scheme. Vtpass you can do better than this. Ads is not meant to be on website that sells services to users. Imagine flutterwave, paystack, banks etc running Google AdSense on their platform. |
airsaylongcome:that is why I said it makes it less intimidating. When I was doing a search on friendly language to learn, after checking other programming languages and seeing the usual type hint and their Syntax at first scares the shit out of me. I just wanted something that is less intimidating even if the code sucks at first. It does the job. This is what makes beginners tend to go for python . So when you compare python syntax and it's loosely typed nature with other languages , you will see why I said it is less intimidating when you remove the type hint. Also you can use type hint like I said if you wish as python has that option for you to explore to make your code neat. |
Edipet:will advice you pause and addore fund to get a system with at least 8gb ram and sad even if it's 120GB space. That cash can may get you a pentum dualcore system. Laptop price is increasing on daily basis. Don't make mistake of buying small GB ram lappy because you might get frustrated when you start running big project as most of the IDE will lag. Although you can use Vscode but it may lag too. so your option will be to use any other less ram eating IDE like sublimeText, vim, atom etc. |
Welcome on board. The loosely typed makes It more interesting and less intimidating. Although you can still use type hinting in your code if you wish. It's an option which is available. this language is one of the first programming language I will recommend anyone who doesn't want to disturb their brain to learn especially if your main focus is not for immediate job hunting. If you learn it with fun in mind, you will really appreciate the language. Also side note, you will enjoy coding with python on Linux operating system as it gives you the real benefits to use most of the modern tools to integrate with without much hassle. That is something I came to realize. |
The title should be changed to how I got scammed by fishing website. People would think you got scammed by fairmoney not knowing you got tricked by fishing site to get your your login details . This is not fairmoney scamming you. Next time look the link very well before clicking. |
You should do more research to know the differences between both. You cannot be learning python without actually knowing the several aspect it can be used for. Since you said data science is what you wish to learn with python, then your focus should be on it. You cannot use html to analyse data. I will advice you to take your time to check online on the uses of python and html as both of them are entirely two different stuff. |
Using virtualbox will reduce the stressing of your laptop. Using VMware workstation will overwork your laptop because it's more heavy compare to when using virtualbox. So which one are you using out of the two. Also you may have to upgrade your laptop to use SSD if not already using it. Increase the ram also if you can |
ThatWriterBoy:Very necessary to make page interactive and for user experience. Don't joke with it. If anyone tells you otherwise, don't listen to them because you will definitely find yourself learning JS at the end no matter how hard you try to skip it. You cannot escape not using JS in your web apps even if it's not advance. I used to think JavaScript is not needed as long as you can code same frontend logic in the backend. But trust me, JavaScript will save you lots of time and prevent users from stressing the server and database. Although you don't have to learn it to advance stage except you want to use it as your stack. If you just want to springle it around your web app, then Just learn it enough to be able to use it and master Dom manupulations. Flask is cool but also I will advice you learn Django instead. It has lots of features with an already made admin panel. |
If you want fast job opportunities, then PHP, node js has more jobs out there but If your learning python is not urgently triggered for job hunting, then you can learn python as it is also very good for backend. Learning python doesn't also stop there, you also need to learn how to deploy it online as it's deployment is not as straight forward like PHP , JavaScript. It's up to you to decide. |
I often recommend pycharm. If your system performance is not avarage, then I will recommend you use Vscode as you might get frustrated running pycharm as it will lag a lot. Also if you decide to go into web develooment with its frameworks, then I will recommend Vs code as it has plugins to give you smooth ride. In fact, install both if you can if you want peace of mind. |
Like someone said, your git is incomplete. You did not add the file that is causing the error. From the look of things . It seems the error is coming from the post id . Probably you did not properly include the post id in your URL patterns or in view def request function. Try not to use the dictionary keyword argument in your URL patterns . Instead use the conventional method .example path("post_details/<int:post_id>/",.........) def post_details(request, post_id): If you can screenshot the code for this , it would be helpful to analyze. |
Most of the popular programming editors would lag on your budget laptop unless you plan on using notepad++. Even at that, react also would lag when done via cli process. Although you can still learn and practice coding with a 4gb ram laptop using some of the light weight tools like vim, sublime text etc and install the necessary plugins needed for a start. Again, when you start noticing the lagging. It may prompt you to want to upgrade. So if you can try to raise more cash to get an 8gb ram with SSD, even if the storage is small, it's better |
That's a job for selenium. You can get in touch for a smart python bot with random sleep time to make it look more like human interacting on the site. Not only that, you can run it even when your normal Chrome browser is already opened. on like the traditional pattern that keeps opening the fresh automation browser all the time, which delays the process. I could even make it a exe file for you so you can run it as a desktop app. So hit me up via contact on my signature. |
LikeAking:Like someone has mentioned, nairaland is more of content driven and popularity . When it comes to backend logic, there is really not much top notch. Even 1 senior dev can get nairaland done in 3 months on steady work. Haven't you seen lots of nairaland clone script out there. A little tweaking, you can add more of nairaland logic to it. Anyway, I am still learning. |
This guy is really joking when he said PHP can be learnt in a day. Na wa. Python syntax is more simple than PHP on biginner level. Learning PHP gives you hedge to develop web apps without needing too many setup on webhosting and frameworks, also for getting gigs. Moreover, you can't really be comparing python and PHP as both of them does different things entirely . PHP is mostly for web while python can actually be used for anything you can think of. Your comparison should have been python, java, go, rubby, rust etc. Not with PHP. |
Emmolap:will advice you use Vs code because pycharm will lag on that system. Download Vs code and then python extension for it and you are good to go. |